This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: Fix compile time warning in pr18808b.c
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 21 Feb 2017 11:00:05 +0000
- Subject: Commit: Fix compile time warning in pr18808b.c
- Authentication-results: sourceware.org; auth=none
Hi Guys
I am checking in the patch below to fix a compile time warning message
when building the linker test file pr18808b.c, and also to tidy up the
formatting in the source code.
Cheers
Nick
ld/ChangeLog
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.
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;
}