History

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.

Thomas Preud'homme committed 15 years ago

Commit 4ccb5661 parent 45184e01 file · +2 −2Browse files

Unified · Split

tests/tcctest.c+2−2
@@ -615,9 +615,9 @@ void scope_test() · 614 unmodified lines
615615 printf("g5=%d\n", g);
616616 }
617617
618−void array_test(int a[4])
618+void array_test()
619619 {
620− int i, j;
620+ int i, j, a[4];
621621
622622 printf("array:\n");
623623 printf("sizeof(a) = %d\n", sizeof(a));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t