]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
tests: mark failed_filename and tests static to fix WARNS=6 build 1433/head
authorKyle Evans <kevans@FreeBSD.org>
Tue, 8 Sep 2020 18:58:32 +0000 (13:58 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 8 Sep 2020 18:58:32 +0000 (13:58 -0500)
Observed on FreeBSD with a higher WARNS level on bsdcat/tests, these two
variables should be private to test_main.c in order to appease the build.

test_utils/test_main.c

index 7b8aa70fac2a3003c8bf50ad6f8269ba18fb525d..40dfa52f08f1ec0cc1af82e7204a30184a1ebe2b 100644 (file)
@@ -475,7 +475,7 @@ static struct line {
        int count;
        int skip;
 }  failed_lines[10000];
-const char *failed_filename;
+static const char *failed_filename;
 
 /* Count this failure, setup up log destination and handle initial report. */
 static void __LA_PRINTFLIKE(3, 4)
@@ -3458,7 +3458,7 @@ assertion_entry_compare_acls(const char *file, int line,
 /* Use "list.h" to create a list of all tests (functions and names). */
 #undef DEFINE_TEST
 #define        DEFINE_TEST(n) { n, #n, 0 },
-struct test_list_t tests[] = {
+static struct test_list_t tests[] = {
        #include "list.h"
 };