]> git.ozlabs.org Git - ccan/blobdiff - ccan/container_of/test/compile_fail-var-types.c
Suppress false positive warning "-Wmaybe-uninitialized" with GCC -O3
[ccan] / ccan / container_of / test / compile_fail-var-types.c
index b7f395c761e7e91a327ef45bc86bec3d14454430..ecdd90916fa64a49ddd899b67f3c5b222186d9a8 100644 (file)
@@ -6,7 +6,7 @@ struct foo {
        char b;
 };
 
-int main(int argc, char *argv[])
+int main(void)
 {
        struct foo foo = { .a = 1, .b = 2 }, *foop;
        int *intp = &foo.a;
@@ -20,5 +20,6 @@ int main(int argc, char *argv[])
 #else
        foop = NULL;
 #endif
+       (void) foop; /* Suppress unused-but-set-variable warning. */
        return intp == NULL;
 }