Skip to content

Commit 39b54f2

Browse files
shemmingertmonjalo
authored andcommitted
mbuf: fix build with GCC and history debug enabled
Message had extra newline which causes build failure with GCC -DRTE_MBUF_HISTORY_DEBUG. lib/mbuf/mbuf_history.c: In function ‘rte_mbuf_history_init’: lib/log/rte_log.h:364:9: error: static assertion failed: "This log format string contains a \\n" 364 | static_assert(!__builtin_strchr(fmt, '\n'), \ | ^~~~~~~~~~~~~ lib/log/rte_log.h:387:9: note: in expansion of macro ‘RTE_LOG_CHECK_NO_NEWLINE’ 387 | RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(__VA_ARGS__ ,)); \ | ^~~~~~~~~~~~~~~~~~~~~~~~ lib/mbuf/mbuf_log.h:8:9: note: in expansion of macro ‘RTE_LOG_LINE’ 8 | RTE_LOG_LINE(level, MBUF, "" __VA_ARGS__) | ^~~~~~~~~~~~ lib/mbuf/mbuf_history.c:219:17: note: in expansion of macro ‘MBUF_LOG’ 219 | MBUF_LOG(ERR, "Failed to register mbuf history dynamic field: %s\n", Fixes: d265a24 ("mbuf: record mbuf operations history") Signed-off-by: Stephen Hemminger <[email protected]>
1 parent 90f838a commit 39b54f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mbuf/mbuf_history.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void rte_mbuf_history_init(void)
216216

217217
rte_mbuf_history_field_offset = rte_mbuf_dynfield_register(&mbuf_dynfield_history);
218218
if (rte_mbuf_history_field_offset < 0) {
219-
MBUF_LOG(ERR, "Failed to register mbuf history dynamic field: %s\n",
219+
MBUF_LOG(ERR, "Failed to register mbuf history dynamic field: %s",
220220
rte_strerror(rte_errno));
221221
}
222222
#endif

0 commit comments

Comments
 (0)