diff options
| author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-12 15:10:59 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-12 15:10:59 +0200 |
| commit | 4ccb5662cbfbf3e8c58a1b642fd3446fcce55e16 (patch) | |
| tree | 6050173f7d5b738dce856b7225f2982382f75b34 | |
| parent | 45184e01d80d0e01bc6d03a86e5aa4e706095e47 (diff) | |
| download | tinycc-4ccb5662cbfbf3e8c58a1b642fd3446fcce55e16.tar.gz tinycc-4ccb5662cbfbf3e8c58a1b642fd3446fcce55e16.tar.bz2 | |
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.
| -rw-r--r-- | tests/tcctest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index 629bcaa..92f239e 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -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)); |
