Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] sim: avoid TRACE redefine warnings
@ 2010-03-14 20:37 Mike Frysinger
  2010-03-15  0:35 ` Joel Brobecker
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Mike Frysinger @ 2010-03-14 20:37 UTC (permalink / raw)
  To: gdb-patches

The common code sets up an autoconf option --enable-sim-trace which adds
-DTRACE= to CPPFLAGS.  This causes warnings in the building of some files
that declare a local TRACE() helper macro.  So punt it from hw-ports.c
(since it isn't actually used) and rename it in hw-properties.c.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
2010-03-14  Mike Frysinger  <vapier@gentoo.org>

	* hw-ports.c (TRACE): Delete.
	* hw-properties.c (TRACE): Rename to _TRACE.

 sim/common/hw-ports.c      |    2 --
 sim/common/hw-properties.c |   10 +++++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c
index 8d5c14e..8f88cb3 100644
--- a/sim/common/hw-ports.c
+++ b/sim/common/hw-ports.c
@@ -35,8 +35,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <ctype.h>
 
-#define TRACE(x,y)
-
 
 struct hw_port_edge {
   int my_port;
diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
index 3166e42..b7d4009 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -33,7 +33,7 @@
 #endif
 #endif
 
-#define TRACE(A,B)
+#define _TRACE(A,B)
 
 /* property entries */
 
@@ -418,7 +418,7 @@ hw_find_ihandle_runtime_property (struct hw *me,
 				  ihandle_runtime_property_spec *ihandle)
 {
   struct hw_property_data *entry = find_property_data (me, property);
-  TRACE (trace_devices,
+  _TRACE (trace_devices,
 	 ("hw_find_ihandle_runtime_property(me=0x%lx, property=%s)\n",
 	  (long)me, property));
   if (entry == NULL)
@@ -492,7 +492,7 @@ hw_find_integer_property (struct hw *me,
 {
   const struct hw_property *node;
   signed_cell integer;
-  TRACE (trace_devices,
+  _TRACE (trace_devices,
 	 ("hw_find_integer(me=0x%lx, property=%s)\n",
 	  (long)me, property));
   node = hw_find_property (me, property);
@@ -514,7 +514,7 @@ hw_find_integer_array_property (struct hw *me,
   const struct hw_property *node;
   int sizeof_integer = sizeof (*integer);
   signed_cell *cell;
-  TRACE (trace_devices,
+  _TRACE (trace_devices,
 	 ("hw_find_integer(me=0x%lx, property=%s)\n",
 	  (long)me, property));
   
@@ -886,7 +886,7 @@ hw_add_duplicate_property (struct hw *me,
 			   const struct hw_property *original)
 {
   struct hw_property_data *master;
-  TRACE (trace_devices,
+  _TRACE (trace_devices,
 	 ("hw_add_duplicate_property(me=0x%lx, property=%s, ...)\n",
 	  (long)me, property));
   if (original->disposition != permenant_object)
-- 
1.7.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-03-22 22:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-14 20:37 [PATCH] sim: avoid TRACE redefine warnings Mike Frysinger
2010-03-15  0:35 ` Joel Brobecker
2010-03-15  7:18   ` Mike Frysinger
2010-03-15 16:49     ` Joel Brobecker
2010-03-15 18:35       ` Mike Frysinger
2010-03-15  0:43 ` Pedro Alves
2010-03-15  7:18   ` Mike Frysinger
2010-03-15 10:53     ` Matt Rice
2010-03-15 13:03     ` Pedro Alves
2010-03-15 18:47 ` [PATCH v2] " Mike Frysinger
2010-03-16 16:06   ` Joel Brobecker
2010-03-22 22:56     ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox