]> git.ozlabs.org Git - ccan/commitdiff
array_size: fix spurious test fail with gcc-5
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 20 Aug 2015 01:39:44 +0000 (11:09 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 20 Aug 2015 01:39:44 +0000 (11:09 +0930)
It now warns about sizeof(function-param-not-really-an-array).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/array_size/test/compile_fail-function-param.c

index cb64d984247bc0a374c4d454968af5df8882958f..48697e044ec797ada4e6c77cddc91159363975db 100644 (file)
@@ -5,8 +5,8 @@ struct foo {
        unsigned int a, b;
 };
 
        unsigned int a, b;
 };
 
-int check_parameter(const struct foo array[4]);
-int check_parameter(const struct foo array[4])
+int check_parameter(const struct foo *array);
+int check_parameter(const struct foo *array)
 {
 #ifdef FAIL
        return (ARRAY_SIZE(array) == 4);
 {
 #ifdef FAIL
        return (ARRAY_SIZE(array) == 4);