diff --git a/include/ignition/gazebo/detail/EntityComponentManager.hh b/include/ignition/gazebo/detail/EntityComponentManager.hh index ee87528162..027baf355c 100644 --- a/include/ignition/gazebo/detail/EntityComponentManager.hh +++ b/include/ignition/gazebo/detail/EntityComponentManager.hh @@ -63,6 +63,7 @@ namespace traits template auto CompareData = [](const DataType &_a, const DataType &_b) -> bool { + // cppcheck-suppress syntaxError if constexpr (std::is_same::value) { return math::equal(_a, _b); diff --git a/src/gui/plugins/entity_tree/EntityTree.hh b/src/gui/plugins/entity_tree/EntityTree.hh index 228a140a57..4f882de9f7 100644 --- a/src/gui/plugins/entity_tree/EntityTree.hh +++ b/src/gui/plugins/entity_tree/EntityTree.hh @@ -81,12 +81,14 @@ namespace gazebo struct EntityInfo { /// \brief Entity ID + // cppcheck-suppress unusedStructMember unsigned int entity; /// \brief Entity name QString name; /// \brief Parent ID + // cppcheck-suppress unusedStructMember unsigned int parentEntity; /// \brief Entity type diff --git a/src/gui/plugins/resource_spawner/ResourceSpawner.hh b/src/gui/plugins/resource_spawner/ResourceSpawner.hh index e2fa9478c8..d95e5727cb 100644 --- a/src/gui/plugins/resource_spawner/ResourceSpawner.hh +++ b/src/gui/plugins/resource_spawner/ResourceSpawner.hh @@ -76,6 +76,7 @@ namespace gazebo /// \brief True if the user is currently observing fuel resources and false /// if the user is currently observing local resources. + // cppcheck-suppress unusedStructMember bool isFuel = false; }; diff --git a/src/gui/plugins/tape_measure/TapeMeasure.cc b/src/gui/plugins/tape_measure/TapeMeasure.cc index 2642c052f3..adbec33d47 100644 --- a/src/gui/plugins/tape_measure/TapeMeasure.cc +++ b/src/gui/plugins/tape_measure/TapeMeasure.cc @@ -15,9 +15,7 @@ * */ -#include "ignition/gazebo/gui/GuiEvents.hh" - -#include "TapeMeasure.hh" +#include #include #include @@ -28,12 +26,14 @@ #include #include #include -#include #include #include #include #include +#include "ignition/gazebo/gui/GuiEvents.hh" +#include "TapeMeasure.hh" + namespace ignition::gazebo { class TapeMeasurePrivate diff --git a/src/ign.cc b/src/ign.cc index 42e1643022..737282cb71 100644 --- a/src/ign.cc +++ b/src/ign.cc @@ -73,6 +73,7 @@ extern "C" IGNITION_GAZEBO_VISIBLE const char *findFuelResource( ignmsg << "Cached world found." << std::endl; worldPath = path; } + // cppcheck-suppress syntaxError else if (ignition::fuel_tools::Result result = fuelClient.DownloadWorld(ignition::common::URI(_pathToResource), path); result) diff --git a/test/integration/scene_broadcaster_system.cc b/test/integration/scene_broadcaster_system.cc index b402fe6269..8caac85336 100644 --- a/test/integration/scene_broadcaster_system.cc +++ b/test/integration/scene_broadcaster_system.cc @@ -82,6 +82,8 @@ TEST_P(SceneBroadcasterTest, PoseInfo) unsigned int sleep{0u}; unsigned int maxSleep{10u}; + // cppcheck-suppress unmatchedSuppression + // cppcheck-suppress knownConditionTrueFalse while (!received && sleep++ < maxSleep) IGN_SLEEP_MS(100); @@ -447,6 +449,8 @@ TEST_P(SceneBroadcasterTest, State) node.Request("/world/default/state_async", req); sleep = 0; + // cppcheck-suppress unmatchedSuppression + // cppcheck-suppress knownConditionTrueFalse while (!received && sleep++ < maxSleep) { // Run server