[dpdk-dev] [PATCH v2] lib/rcu: avoid literal suffix warning in C++ mode

Thomas Monjalon thomas at monjalon.net
Tue Oct 6 00:47:36 CEST 2020


> > Sequences like "value = %"PRIu64 (no space before PRIu64) are parsed as a
> > single preprocessor token, user-defined-string-literal, in C++11 onwards.
> > While modern compilers are smart enough to parse this properly, GCC 9.3.0
> > generates warnings like:
> > 
> >     rte_rcu_qsbr.h:555:26: warning: invalid suffix on literal; C++11
> >     requires a space between literal and string macro [-Wliteral-suffix]
> > 
> > Add spaces around format specifier macros to make public headers
> > compatible with C++ without causing warnings. Make similar changes in C
> > source for style consistency within the library.
> > 
> > Fixes: 64994b56c ("rcu: add RCU library supporting QSBR mechanism")
> > Cc: stable at dpdk.org
> > 
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Looks good, Thank you.
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>

Applied, thanks





More information about the dev mailing list