Enable bugprone clang check
bugprone-multi-level-implicit-pointer-conversion is something that we
pass currently, with one exception in the deprecated rest API. Ignore
the one exception, as it's not clear how to fix it, and enable the
check.
Tested: Clang tidy passes.
Change-Id: Idc10e0bb7b876e1c70afa28f9c27cc7bef1db0d7
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/.clang-tidy b/.clang-tidy
index 71e80a4..c7963c0 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -26,6 +26,7 @@
bugprone-misplaced-pointer-arithmetic-in-alloc,
bugprone-misplaced-widening-cast,
bugprone-move-forwarding-reference,
+bugprone-multi-level-implicit-pointer-conversion,
bugprone-multiple-statement-macro,
bugprone-narrowing-conversions,
bugprone-no-escape,
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index e801a32..dd1dac3 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -951,7 +951,10 @@
nlohmann::json& data)
{
T value;
-
+ // When T == char*, this warning fires. Unclear how to resolve
+ // Given that sd-bus takes a void pointer to a char*, and that's
+ // Not something we can fix.
+ // NOLINTNEXTLINE(bugprone-multi-level-implicit-pointer-conversion)
int r = sd_bus_message_read_basic(m.get(), typeCode.front(), &value);
if (r < 0)
{