diff options
author | Nick Clifton <nickc@redhat.com> | 2017-02-21 11:00:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-02-21 11:00:21 +0000 |
commit | 465197842a6ff829eea88b3b96b05c433a797aae (patch) | |
tree | ac76456e67e16ae78c0e18eb9d3891771a53aa92 /ld | |
parent | 7814882a6534c100d8eba1a41588611a8b38c429 (diff) | |
download | gdb-465197842a6ff829eea88b3b96b05c433a797aae.zip gdb-465197842a6ff829eea88b3b96b05c433a797aae.tar.gz gdb-465197842a6ff829eea88b3b96b05c433a797aae.tar.bz2 |
Fix compile time warning message in linker testsuite test.
* testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning
about non-void function returning without a result.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/pr18808b.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 1da0e99..c73a5c3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2017-02-21 Nick Clifton <nickc@redhat.com> + + * testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning + about non-void function returning without a result. + 2017-02-17 Alan Modra <amodra@gmail.com> PR 15041 diff --git a/ld/testsuite/ld-ifunc/pr18808b.c b/ld/testsuite/ld-ifunc/pr18808b.c index 6f0db5a..0e189f4 100644 --- a/ld/testsuite/ld-ifunc/pr18808b.c +++ b/ld/testsuite/ld-ifunc/pr18808b.c @@ -1,24 +1,26 @@ -int foo (int x) __attribute__ ((ifunc ("resolve_foo"))); +int foo (int) __attribute__ ((ifunc ("resolve_foo"))); extern void abort (void); -static int foo_impl(int x) +static int +foo_impl (int x) { return x; } -int bar() +void +bar (void) { int (*f)(int) = foo; if (foo (5) != 5) abort (); - if (f(42) != 42) + if (f (42) != 42) abort (); } - -void *resolve_foo (void) +void * +resolve_foo (void) { return (void *) foo_impl; } |