From 7f14fda55ac98cf97bf1dd79aea08fd920c2c26b Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 7 Oct 2019 00:42:22 -0700 Subject: [PATCH] remove unmatched cppcheck suppressions --- gazebo/common/MovingWindowFilter.hh | 4 ---- gazebo/common/STLLoader.cc | 6 ------ gazebo/common/URI.hh | 1 - plugins/ContainPlugin.hh | 1 - tools/code_check.sh | 11 +---------- 5 files changed, 1 insertion(+), 22 deletions(-) diff --git a/gazebo/common/MovingWindowFilter.hh b/gazebo/common/MovingWindowFilter.hh index 917869f0ba..87b54921ab 100644 --- a/gazebo/common/MovingWindowFilter.hh +++ b/gazebo/common/MovingWindowFilter.hh @@ -66,8 +66,6 @@ namespace gazebo ////////////////////////////////////////////////// /// \TODO FIXME hardcoded initial values for now template - // false positive. Same code is fine if we remove the namespaces - // cppcheck-suppress uninitMemberVar MovingWindowFilterPrivate::MovingWindowFilterPrivate() : valWindowSize(4), sum(T()), @@ -119,8 +117,6 @@ namespace gazebo ////////////////////////////////////////////////// template - // false positive. Same code is fine if we remove the namespaces - // cppcheck-suppress uninitMemberVar MovingWindowFilter::MovingWindowFilter() : dataPtr(new MovingWindowFilterPrivate()) { diff --git a/gazebo/common/STLLoader.cc b/gazebo/common/STLLoader.cc index fe3a611ef1..a2a6724982 100644 --- a/gazebo/common/STLLoader.cc +++ b/gazebo/common/STLLoader.cc @@ -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); @@ -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) @@ -154,8 +150,6 @@ bool STLLoader::ReadAscii(FILE *_filein, Mesh *_mesh) // COLOR else if (this->Leqi (token, const_cast("color"))) { - // cppcheck-suppress invalidscanf - // cppcheck-suppress invalidscanf_libc sscanf(next, "%*s %f %f %f %f", &r1, &r2, &r3, &r4); } // SOLID diff --git a/gazebo/common/URI.hh b/gazebo/common/URI.hh index 14f037ab43..d336332588 100644 --- a/gazebo/common/URI.hh +++ b/gazebo/common/URI.hh @@ -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 diff --git a/plugins/ContainPlugin.hh b/plugins/ContainPlugin.hh index cdc2947922..af3525352e 100644 --- a/plugins/ContainPlugin.hh +++ b/plugins/ContainPlugin.hh @@ -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); diff --git a/tools/code_check.sh b/tools/code_check.sh index 7948461150..9b264a1ad2 100755 --- a/tools/code_check.sh +++ b/tools/code_check.sh @@ -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