From 638dcfc611d669ae9985fe9fa75c0c01977fa554 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 5 Oct 2020 12:01:37 -0400 Subject: [PATCH] Cleanup: lttng-syscalls: silence warning about uninitialized bitmap variable Signed-off-by: Mathieu Desnoyers --- lttng-syscalls.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 26cead68..49c0d81b 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -1057,7 +1057,6 @@ int lttng_syscall_filter_enable(struct lttng_channel *chan, if (syscall_nr < 0) return -ENOENT; - switch (event->u.syscall.entryexit) { case LTTNG_SYSCALL_ENTRY: switch (event->u.syscall.abi) { @@ -1067,6 +1066,8 @@ int lttng_syscall_filter_enable(struct lttng_channel *chan, case LTTNG_SYSCALL_ABI_COMPAT: bitmap = filter->sc_compat_entry; break; + default: + return -EINVAL; } break; case LTTNG_SYSCALL_EXIT: @@ -1077,6 +1078,8 @@ int lttng_syscall_filter_enable(struct lttng_channel *chan, case LTTNG_SYSCALL_ABI_COMPAT: bitmap = filter->sc_compat_exit; break; + default: + return -EINVAL; } break; default: @@ -1113,7 +1116,6 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan, if (syscall_nr < 0) return -ENOENT; - switch (event->u.syscall.entryexit) { case LTTNG_SYSCALL_ENTRY: switch (event->u.syscall.abi) { @@ -1123,6 +1125,8 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan, case LTTNG_SYSCALL_ABI_COMPAT: bitmap = filter->sc_compat_entry; break; + default: + return -EINVAL; } break; case LTTNG_SYSCALL_EXIT: @@ -1133,6 +1137,8 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan, case LTTNG_SYSCALL_ABI_COMPAT: bitmap = filter->sc_compat_exit; break; + default: + return -EINVAL; } break; default: -- 2.34.1