Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2] sim: avoid TRACE redefine warnings
Date: Mon, 15 Mar 2010 18:47:00 -0000	[thread overview]
Message-ID: <1268678817-11407-1-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1268599156-23584-1-git-send-email-vapier@gentoo.org>

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 convert hw-properties.c to HW_TRACE().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
	- convert hw-properties.c to HW_TRACE

2010-03-15  Mike Frysinger  <vapier@gentoo.org>

	* hw-ports.c (TRACE): Delete.
	* hw-properties.c (TRACE): Delete.
	(hw_find_ihandle_runtime_property): Change TRACE to HW_TRACE.
	(hw_find_integer_property): Likewise.
	(hw_find_integer_array_property): Likewise.
	(hw_add_duplicate_property): Likewise.

 sim/common/hw-ports.c      |    2 --
 sim/common/hw-properties.c |   18 ++++--------------
 2 files changed, 4 insertions(+), 16 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..018a84c 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -33,8 +33,6 @@
 #endif
 #endif
 
-#define TRACE(A,B)
-
 /* property entries */
 
 struct hw_property_data {
@@ -418,9 +416,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,
-	 ("hw_find_ihandle_runtime_property(me=0x%lx, property=%s)\n",
-	  (long)me, property));
+  HW_TRACE ((me, "hw_find_ihandle_runtime_property(property=%s)\n", property));
   if (entry == NULL)
     hw_abort (me, "property \"%s\" not found", property);
   if (entry->property->type != ihandle_property
@@ -492,9 +488,7 @@ hw_find_integer_property (struct hw *me,
 {
   const struct hw_property *node;
   signed_cell integer;
-  TRACE (trace_devices,
-	 ("hw_find_integer(me=0x%lx, property=%s)\n",
-	  (long)me, property));
+  HW_TRACE ((me, "hw_find_integer(property=%s)\n", property));
   node = hw_find_property (me, property);
   if (node == NULL)
     hw_abort (me, "property \"%s\" not found", property);
@@ -514,9 +508,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,
-	 ("hw_find_integer(me=0x%lx, property=%s)\n",
-	  (long)me, property));
+  HW_TRACE ((me, "hw_find_integer(property=%s)\n", property));
   
   /* check things sane */
   node = hw_find_property (me, property);
@@ -886,9 +878,7 @@ hw_add_duplicate_property (struct hw *me,
 			   const struct hw_property *original)
 {
   struct hw_property_data *master;
-  TRACE (trace_devices,
-	 ("hw_add_duplicate_property(me=0x%lx, property=%s, ...)\n",
-	  (long)me, property));
+  HW_TRACE ((me, "hw_add_duplicate_property(property=%s, ...)\n", property));
   if (original->disposition != permenant_object)
     hw_abort (me, "Can only duplicate permenant objects");
   /* find the original's master */
-- 
1.7.0


  parent reply	other threads:[~2010-03-15 18:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-14 20:37 [PATCH] " 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 ` Mike Frysinger [this message]
2010-03-16 16:06   ` [PATCH v2] " Joel Brobecker
2010-03-22 22:56     ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1268678817-11407-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox