ctf: fix -Wformat-overflow error in ctf-meta-resolve.cpp
Fix this, seen when building with -O2 with gcc 12.2.1:
CXX ctf-meta-resolve.lo
In file included from ../../../../../src/logging/comp-logging.h:16,
from ctf-meta-resolve.cpp:12:
In function 'int pathstr_to_field_path(const char*, ctf_field_path*, resolve_context*)',
inlined from 'int resolve_sequence_or_variant_field_class(ctf_field_class*, resolve_context*)' at ctf-meta-resolve.cpp:948:32,
inlined from 'int resolve_field_class(ctf_field_class*, resolve_context*)' at ctf-meta-resolve.cpp:1026:54:
../../../../../src/logging/comp-logging.h:18:41: error: '%s' directive argument is null [-Werror=format-overflow=]
18 | #define _BT_COMP_LOG_COMP_PREFIX "[%s] "
../../../../../src/logging/log.h:815:67: note: in definition of macro 'BT_LOG_WRITE'
815 | lvl, tag, __VA_ARGS__); \
| ^~~~~~~~~~~
../../../../../src/logging/comp-logging.h:23:42: note: in expansion of macro '_BT_COMP_LOG_COMP_PREFIX'
23 | BT_LOG_WRITE((_lvl), BT_LOG_TAG, _BT_COMP_LOG_COMP_PREFIX _fmt, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../../../../src/logging/comp-logging.h:83:9: note: in expansion of macro 'BT_COMP_LOG'
83 | BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
ctf-meta-resolve.cpp:650:9: note: in expansion of macro 'BT_COMP_LOGD'
650 | BT_COMP_LOGD("Found field path: path=\"%s\", field-path=\"%s\"", pathstr,
| ^~~~~~~~~~~~
Change-Id: Ib311185359a531f3e14bfbbbe6726aa633ceb3e4
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025018 seconds and 4 git commands to generate.