Skip to content

Commit

Permalink
Fix codecheck (#499)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>

Co-authored-by: Nate Koenig <[email protected]>
  • Loading branch information
nkoenig and Nate Koenig authored Dec 18, 2020
1 parent 128e29d commit 1672d2b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/ignition/gazebo/detail/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ namespace traits
template<typename DataType>
auto CompareData = [](const DataType &_a, const DataType &_b) -> bool
{
// cppcheck-suppress syntaxError
if constexpr (std::is_same<DataType, double>::value)
{
return math::equal(_a, _b);
Expand Down
2 changes: 2 additions & 0 deletions src/gui/plugins/entity_tree/EntityTree.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/gui/plugins/resource_spawner/ResourceSpawner.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
8 changes: 4 additions & 4 deletions src/gui/plugins/tape_measure/TapeMeasure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
*
*/

#include "ignition/gazebo/gui/GuiEvents.hh"

#include "TapeMeasure.hh"
#include <ignition/msgs/marker.pb.h>

#include <iostream>
#include <unordered_set>
Expand All @@ -28,12 +26,14 @@
#include <ignition/gui/Application.hh>
#include <ignition/gui/GuiEvents.hh>
#include <ignition/gui/MainWindow.hh>
#include <ignition/msgs/marker.pb.h>
#include <ignition/msgs/Utility.hh>
#include <ignition/plugin/Register.hh>
#include <ignition/transport/Node.hh>
#include <ignition/transport/Publisher.hh>

#include "ignition/gazebo/gui/GuiEvents.hh"
#include "TapeMeasure.hh"

namespace ignition::gazebo
{
class TapeMeasurePrivate
Expand Down
1 change: 1 addition & 0 deletions src/ign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions test/integration/scene_broadcaster_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1672d2b

Please sign in to comment.