Fix unused params when lttng not enabled

This commit is contained in:
Christophe Bedard 2019-06-17 15:58:20 +02:00
parent 55127d0c31
commit b41c59fbdd
2 changed files with 10 additions and 0 deletions

View file

@ -17,6 +17,11 @@ bool ros_trace_compile_status()
#endif #endif
} }
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
void TRACEPOINT( void TRACEPOINT(
rcl_init, rcl_init,
const void * context_handle) const void * context_handle)
@ -193,3 +198,7 @@ void TRACEPOINT(
callback_end, callback_end,
callback); callback);
} }
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif

View file

@ -25,6 +25,7 @@ const char * get_symbol(void * funptr)
const char * demangled_val = (status == 0 ? demangled : info.dli_sname); const char * demangled_val = (status == 0 ? demangled : info.dli_sname);
return demangled_val != 0 ? demangled_val : SYMBOL_UNKNOWN; return demangled_val != 0 ? demangled_val : SYMBOL_UNKNOWN;
#else #else
(void)funptr;
return SYMBOL_UNKNOWN; return SYMBOL_UNKNOWN;
#endif #endif
} }