Fix: add missing cases in enum-to-string functions
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 10 Nov 2021 15:17:41 +0000 (10:17 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 11 Nov 2021 22:47:54 +0000 (17:47 -0500)
commit00dff0ec100dfdf9769819da6a5f5d29f464dede
treec24fd46b218654c0890d46a393e29be5cbc6026a
parenta0baab4a979e830f7dc4698c20b71e84dea6ff9d
Fix: add missing cases in enum-to-string functions

Change the enum-to-string functions to not use a default case, such that
the compiler will give a -Wswitch warning if an enumerator is not
handled.  Add some missing ones found by such warnings.

Put a bt_common_abort call after each switch (rather than returning
"(unknown)", because there's no way in theory that we can reach that.
Having anything else would be a bug we would want to fix in babeltrace.

Change-Id: I2cfae112386aede4844062be51dba009a1e9a056
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/6693
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/common/common.h
src/lib/graph/message/message.h
src/plugins/ctf/common/bfcr/bfcr.c
src/plugins/ctf/common/bfcr/bfcr.h
src/plugins/ctf/common/msg-iter/msg-iter.c
src/plugins/ctf/common/msg-iter/msg-iter.h
This page took 0.027028 seconds and 4 git commands to generate.