Skip to content

Commit

Permalink
remove unmatched cppcheck suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters committed Oct 7, 2019
1 parent 5d17c94 commit 7f14fda
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 22 deletions.
4 changes: 0 additions & 4 deletions gazebo/common/MovingWindowFilter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ namespace gazebo
//////////////////////////////////////////////////
/// \TODO FIXME hardcoded initial values for now
template<typename T>
// false positive. Same code is fine if we remove the namespaces
// cppcheck-suppress uninitMemberVar
MovingWindowFilterPrivate<T>::MovingWindowFilterPrivate() :
valWindowSize(4),
sum(T()),
Expand Down Expand Up @@ -119,8 +117,6 @@ namespace gazebo

//////////////////////////////////////////////////
template<typename T>
// false positive. Same code is fine if we remove the namespaces
// cppcheck-suppress uninitMemberVar
MovingWindowFilter<T>::MovingWindowFilter()
: dataPtr(new MovingWindowFilterPrivate<T>())
{
Expand Down
6 changes: 0 additions & 6 deletions gazebo/common/STLLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ bool STLLoader::ReadAscii(FILE *_filein, Mesh *_mesh)
ignition::math::Vector3d normal;

// Get the XYZ coordinates of the normal vector to the face.
// cppcheck-suppress invalidscanf
// cppcheck-suppress invalidscanf_libc
sscanf(next, "%*s %e %e %e", &r1, &r2, &r3);

normal.X(r1);
Expand All @@ -129,8 +127,6 @@ bool STLLoader::ReadAscii(FILE *_filein, Mesh *_mesh)
break;
}

// cppcheck-suppress invalidscanf
// cppcheck-suppress invalidscanf_libc
count = sscanf(input, "%*s %e %e %e", &r1, &r2, &r3);

if (count != 3)
Expand All @@ -154,8 +150,6 @@ bool STLLoader::ReadAscii(FILE *_filein, Mesh *_mesh)
// COLOR
else if (this->Leqi (token, const_cast<char*>("color")))
{
// cppcheck-suppress invalidscanf
// cppcheck-suppress invalidscanf_libc
sscanf(next, "%*s %f %f %f %f", &r1, &r2, &r3, &r4);
}
// SOLID
Expand Down
1 change: 0 additions & 1 deletion gazebo/common/URI.hh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ namespace gazebo

/// \brief Construct a URI object from a string.
/// \param[in] _str A string.
// cppcheck-suppress noExplicitConstructor
public: URI(const std::string &_str);

/// \brief Copy constructor
Expand Down
1 change: 0 additions & 1 deletion plugins/ContainPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ namespace gazebo
/// \param[in] _req Request, true to enable
/// \param[out] _res Response message indicating success or failure.
/// \return True if successful.
// cppcheck-suppress unusedPrivateFunction
private: bool EnableIgn(const ignition::msgs::Boolean &_req,
ignition::msgs::Boolean &_res);

Expand Down
11 changes: 1 addition & 10 deletions tools/code_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,12 @@ else
fi

SUPPRESS=/tmp/gazebo_cpp_check.suppress
echo > $SUPPRESS
# (warning) Redundant code: Found a statement that begins with string constant.
echo "*:gazebo/common/SVGLoader.cc:869" > $SUPPRESS
echo "*:examples/plugins/custom_messages/custom_messages.cc:22" >> $SUPPRESS
# STOP: before use this suppress list please consider to use inline
# cppcheck-suppress comments

# Not defined FREEIMAGE_COLORORDER
echo "*:gazebo/common/Image.cc:1" >> $SUPPRESS

# Disable noExplicitConstructor warnings in gazebo7 release series
# (release expected in 01/25/2017) relaxed to 31/01/2015
if [ $CPPCHECK_GE_169 -eq 1 ] && [ `date '+%Y%m%d'` -lt 20170131 ]; then
echo "noExplicitConstructor" >> $SUPPRESS
fi

#cppcheck.
# MAKE_JOBS is used in jenkins. If not set or run manually, default to 1
[ -z $MAKE_JOBS ] && MAKE_JOBS=1
Expand Down

0 comments on commit 7f14fda

Please sign in to comment.