diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-09-17 07:43:49 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2008-09-17 07:43:49 +0000 |
commit | 32649b97b910a25743777a9ef0c7ba2a0bae3e35 (patch) | |
tree | c2722c7f49b41560a190fd4b91c0bde550c534af /ld/testsuite/ld-shared | |
parent | 1c4a0acdd38b0f5151b2e00768ab567bd4785670 (diff) | |
download | gdb-32649b97b910a25743777a9ef0c7ba2a0bae3e35.zip gdb-32649b97b910a25743777a9ef0c7ba2a0bae3e35.tar.gz gdb-32649b97b910a25743777a9ef0c7ba2a0bae3e35.tar.bz2 |
Fix testcases compilation failures due to unused variables.
* ld-elfcomm/common1b.c (dummy1): Mark the variable for GCC as USED.
* ld-shared/main.c (main): Move the P variable only to the places where
it is used.
Diffstat (limited to 'ld/testsuite/ld-shared')
-rw-r--r-- | ld/testsuite/ld-shared/main.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/ld/testsuite/ld-shared/main.c b/ld/testsuite/ld-shared/main.c index ce06261..0817d27 100644 --- a/ld/testsuite/ld-shared/main.c +++ b/ld/testsuite/ld-shared/main.c @@ -38,8 +38,6 @@ shlib_overriddencall2 () int main () { - int (*p) (); - printf ("mainvar == %d\n", mainvar); printf ("overriddenvar == %d\n", overriddenvar); printf ("shlibvar1 == %d\n", shlibvar1); @@ -62,21 +60,29 @@ main () printf ("shlib_checkfunptr2 (main_called) == %d\n", shlib_checkfunptr2 (main_called)); #endif - p = shlib_getfunptr1 (); - printf ("shlib_getfunptr1 () "); - if (p == shlib_shlibvar1) - printf ("=="); - else - printf ("!="); - printf (" shlib_shlibvar1\n"); + { + int (*p) (); + + p = shlib_getfunptr1 (); + printf ("shlib_getfunptr1 () "); + if (p == shlib_shlibvar1) + printf ("=="); + else + printf ("!="); + printf (" shlib_shlibvar1\n"); + } #ifndef XCOFF_TEST - p = shlib_getfunptr2 (); - printf ("shlib_getfunptr2 () "); - if (p == main_called) - printf ("=="); - else - printf ("!="); - printf (" main_called\n"); + { + int (*p) (); + + p = shlib_getfunptr2 (); + printf ("shlib_getfunptr2 () "); + if (p == main_called) + printf ("=="); + else + printf ("!="); + printf (" main_called\n"); + } #endif #endif printf ("shlib_check () == %d\n", shlib_check ()); |