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
615 printf("g5=%d\n", g);615 printf("g5=%d\n", g);
616}616}
617 617
618void array_test(int a[4])618void array_test()
619{619{
620 int i, j;620 int i, j, a[4];
621 621
622 printf("array:\n");622 printf("array:\n");
623 printf("sizeof(a) = %d\n", sizeof(a));623 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