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-elfcomm | |
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-elfcomm')
-rw-r--r-- | ld/testsuite/ld-elfcomm/common1b.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/testsuite/ld-elfcomm/common1b.c b/ld/testsuite/ld-elfcomm/common1b.c index 4ed9e03..a375c90 100644 --- a/ld/testsuite/ld-elfcomm/common1b.c +++ b/ld/testsuite/ld-elfcomm/common1b.c @@ -1,3 +1,7 @@ -static char dummy1 = 'X'; +static +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) + __attribute__((__used__)) +#endif /* __GNUC__ */ + char dummy1 = 'X'; char foo1 [] = "Aligned at odd byte."; char foo2 [4]; |