[MIPS] Fix unused function warning
diff mbox

Message ID 7be004c8-262d-4e29-8ad4-f3cfbd41ea5d@BAMAIL02.ba.imgtec.org
State New
Headers show

Commit Message

Steve Ellcey Dec. 10, 2014, 8:41 p.m. UTC
Here is another patch for an unused function warning during the glibc mips
build.


warning-nop.c:39:1: error: 'nop' defined but not used [-Werror=unused-function]
 nop (void)
 ^
cc1: all warnings being treated as errors



I added a used attribute to the nop function to get rid of the warning.
OK to checkin?

Steve Ellcey
sellcey@imgtec.com


2014-12-10  Steve Ellcey  <sellcey@imgtec.com>

	* debug/warning-nop.c: Add used atrribute.

Comments

Joseph Myers Dec. 10, 2014, 9:35 p.m. UTC | #1
On Wed, 10 Dec 2014, Steve Ellcey  wrote:

> 2014-12-10  Steve Ellcey  <sellcey@imgtec.com>
> 
> 	* debug/warning-nop.c: Add used atrribute.

OK.

(I imagine this is actually compiler-version-dependent, not 
architecture-dependent.)

Patch
diff mbox

diff --git a/debug/warning-nop.c b/debug/warning-nop.c
index 2a16f27..2064310 100644
--- a/debug/warning-nop.c
+++ b/debug/warning-nop.c
@@ -36,6 +36,7 @@ 
 #include <sys/cdefs.h>
 
 static void
+__attribute__ ((used))
 nop (void)
 {
 }