Fix clang-tidy cppcoreguidelines-pro-type-const-cast warning
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Jun 2023 17:43:28 +0000 (13:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Jun 2023 17:49:39 +0000 (13:49 -0400)
commit1e0019bb584561d6d93ec74b72b2f673dd661f9d
treeda20fd42eb8700639101a7ce38df3243b002c006
parentca496d870cc9a991c1c79c7db9d213845b181420
Fix clang-tidy cppcoreguidelines-pro-type-const-cast warning

clang-tidy reports:
cppcoreguidelines-pro-type-const-cast; do not use const_cast

The const_cast adds a const qualifier so this warning seems a bit
strict. Regardless, we can dodge the whole question by passing the
exclusion_list as `const char * const *`, which is closer to the
original intention of the API anyhow.

For more information on the safety of these types of casts, see:
https://isocpp.org/wiki/faq/const-correctness#constptrptr-conversion

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia3129b7d1ed4e450f3f2d63920d2fd67c66a6d73
include/lttng/event-internal.hpp
src/bin/lttng-sessiond/cmd.cpp
src/common/event.cpp
src/lib/lttng-ctl/lttng-ctl.cpp
This page took 0.025111 seconds and 4 git commands to generate.