Skip to contentSkip to conversation

tracing: add #undef to fix compile error

PATCH Rik van Riel 2 participants 3 messages Sep 29, 2016 – Mar 2, 2017 Tracing

lore
Share & tools
lore
#0 lore raw

There are several trace include files that define TRACE_INCLUDE_FILE.

Include several of them in the same .c file (as I currently have in some code I am working on), and the compile will blow up with a "warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls"

Every other include file in include/trace/events/ avoids that issue by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h should have one, too.

---
 include/trace/events/syscalls.h | 1 +
 1 file changed, 1 insertion(+)
include/trace/events/syscalls.h +1 -0
index 14e49c798135..b35533b94277 100644
@@ -1,5 +1,6 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM raw_syscalls
+#undef TRACE_INCLUDE_FILE
 #define TRACE_INCLUDE_FILE syscalls
 
 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
maintainer
#1 lore raw
Quoted 9 lines · On Wed, 28 Sep 2016 22:55:54 -0400 Rik van Riel <[email protected]> wrote:

There are several trace include files that define TRACE_INCLUDE_FILE.

Include several of them in the same .c file (as I currently have in some code I am working on), and the compile will blow up with a "warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls"

Every other include file in include/trace/events/ avoids that issue by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h should have one, too.

Cleaning out my INBOX, I stumbled over this patch. It looks like I missed it. I'm guessing this is still an issue? (Too lazy to actually look deeper, well just too tired at the moment).

-- Steve

Quoted 17 lines
---
 include/trace/events/syscalls.h | 1 +
 1 file changed, 1 insertion(+)
include/trace/events/syscalls.h +1 -0
index 14e49c798135..b35533b94277 100644
@@ -1,5 +1,6 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM raw_syscalls
+#undef TRACE_INCLUDE_FILE
 #define TRACE_INCLUDE_FILE syscalls
 
 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
#2 lore raw
Quoted 11 lines · Steven Rostedt
Quoted 8 lines · On Wed, 28 Sep 2016 22:55:54 -0400 Rik van Riel <[email protected]> wrote:

There are several trace include files that define
TRACE_INCLUDE_FILE.

Include several of them in the same .c file (as I currently have in some code I am working on), and the compile will blow up with a "warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls"

Quoted 8 lines
Quoted 4 lines

Every other include file in include/trace/events/ avoids that issue by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h
should have one, too.

Cleaning out my INBOX, I stumbled over this patch. It looks like I missed it. I'm guessing this is still an issue? (Too lazy to actually look deeper, well just too tired at the moment).

I believe it is :)

Quoted 20 lines
Quoted 18 lines

---
 include/trace/events/syscalls.h | 1 +

 1 file changed, 1 insertion(+)
include/trace/events/syscalls.h +1 -0
index 14e49c798135..b35533b94277 100644
@@ -1,5 +1,6 @@
  #undef TRACE_SYSTEM
  #define TRACE_SYSTEM raw_syscalls
+#undef TRACE_INCLUDE_FILE
  #define TRACE_INCLUDE_FILE syscalls


 #if !defined(_TRACE_EVENTS_SYSCALLS_H) ||
defined(TRACE_HEADER_MULTI_READ)