Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Silence -Wnull-dereference warning in generated CTF parser code
Building Babeltrace on amd64 with -O3 on Ubuntnu 18.04 (gcc 7.4.0-1ubuntu1~18.04.1), I see: make[1]: Entering directory '/home/smarchi/build/babeltrace-opt/src/plugins/ctf/common/metadata' CC libctf_parser_la-lexer.lo /home/smarchi/src/babeltrace/src/plugins/ctf/common/metadata/lexer.c: In function ‘yyrestart’: /home/smarchi/src/babeltrace/src/plugins/ctf/common/metadata/lexer.c:1997:20: error: potential null pointer dereference [-Werror=null-dereference] b->yy_fill_buffer = 1; ~~~~~~~~~~~~~~~~~~^~~ This is code generated by flex, there's not much we can do, so silence the warning for the helper library that contains the lexer/parser. Change-Id: I6698a73f50e88cb75b94ca80deec0f3a9556c4bf Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Reviewed-on: https://review.lttng.org/c/babeltrace/+/2895 Tested-by: jenkins <jenkins@lttng.org> Reviewed-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- Loading branch information