This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] fix several warnings building cgen sims


Hi.

This patch removes several warnings of the form:

../../../../../../src/sim/m32r/../common/cgen-mem.h: In function âGETTQIâ:
../../../../../../src/sim/m32r/../common/cgen-mem.h:177: warning: âendian_t2h_1â is static but used in inline function âGETTQIâ which is not static

These functions aren't performance critical,
so I just removed the inlining.

Tested by running the gdb testsuite with m32r-sim.

2009-11-05  Doug Evans  <dje@sebabeach.org>

	* cgen-mem.h (DECLARE_GETT): Don't inline.
	(DECLARE_SETT): Ditto.

Index: cgen-mem.h
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-mem.h,v
retrieving revision 1.5
diff -u -p -r1.5 cgen-mem.h
--- cgen-mem.h	14 Jan 2009 10:53:05 -0000	1.5
+++ cgen-mem.h	6 Nov 2009 04:44:40 -0000
@@ -160,9 +160,9 @@ DECLARE_SETMEM (DF, 8) /* TAGS: SETMEMDF
    This needn't be very efficient (i.e. can call memcpy) as this is
    only used when interfacing with the outside world (e.g. gdb).  */
 
-#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE)
+#if defined (MEMOPS_DEFINE_INLINE)
 #define DECLARE_GETT(mode, size) \
-MEMOPS_INLINE mode \
+mode \
 XCONCAT2 (GETT,mode) (unsigned char *p) \
 { \
   mode tmp; \
@@ -195,9 +195,9 @@ DECLARE_GETT (TF, 16) /* TAGS: GETTTF */
    This needn't be very efficient (i.e. can call memcpy) as this is
    only used when interfacing with the outside world (e.g. gdb).  */
 
-#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE)
+#if defined (MEMOPS_DEFINE_INLINE)
 #define DECLARE_SETT(mode, size) \
-MEMOPS_INLINE void \
+void \
 XCONCAT2 (SETT,mode) (unsigned char *buf, mode val) \
 { \
   mode tmp; \
@@ -206,7 +206,7 @@ XCONCAT2 (SETT,mode) (unsigned char *buf
 }
 #else
 #define DECLARE_SETT(mode, size) \
-extern mode XCONCAT2 (GETT,mode) (unsigned char *, mode);
+extern mode XCONCAT2 (SETT,mode) (unsigned char *, mode);
 #endif
 
 DECLARE_SETT (QI, 1)  /* TAGS: SETTQI */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]