Fix array_test: move params to local vars
array_test is declared and called with no parameters but defined with one parameter. Compilation succeed (definition is after the use so the compiler consider the declaration) as well as link (the function exist and has the right name) but running the test segfault on i386 platforms. This patch moves the parameter to local variable. If the intention was to call it with an array parameter then feel free to fix it again.
This commit is contained in:
parent
45184e01d8
commit
4ccb5662cb
1 changed files with 2 additions and 2 deletions
|
@ -615,9 +615,9 @@ void scope_test()
|
|||
printf("g5=%d\n", g);
|
||||
}
|
||||
|
||||
void array_test(int a[4])
|
||||
void array_test()
|
||||
{
|
||||
int i, j;
|
||||
int i, j, a[4];
|
||||
|
||||
printf("array:\n");
|
||||
printf("sizeof(a) = %d\n", sizeof(a));
|
||||
|
|
Loading…
Reference in a new issue