Browse Source

array_size: fix spurious test fail with gcc-5

It now warns about sizeof(function-param-not-really-an-array).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 10 years ago
parent
commit
28f2b56d3c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ccan/array_size/test/compile_fail-function-param.c

+ 2 - 2
ccan/array_size/test/compile_fail-function-param.c

@@ -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
 #ifdef FAIL
 	return (ARRAY_SIZE(array) == 4);
 	return (ARRAY_SIZE(array) == 4);