From c3ba9dd69f7ef951b7f5ccfd8ec2565ae7425417 Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 2 Aug 2016 22:05:28 +0300 Subject: [PATCH] Fixed cppcheck style warnings --- cds/details/bitop_generic.h | 6 +++--- test/stress/framework/city.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cds/details/bitop_generic.h b/cds/details/bitop_generic.h index 38a1dd49..a1a59445 100644 --- a/cds/details/bitop_generic.h +++ b/cds/details/bitop_generic.h @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CDSLIB_DETAILS_BITOP_GENERIC_H @@ -81,7 +81,7 @@ namespace cds { r -= 2; } if (!(x & 0x80000000u)) { - x <<= 1; + //x <<= 1; r -= 1; } return r; @@ -143,7 +143,7 @@ namespace cds { r += 2; } if (!(x & 1)) { - x >>= 1; + //x >>= 1; r += 1; } return r; diff --git a/test/stress/framework/city.cpp b/test/stress/framework/city.cpp index 69ba0e6a..bb4b3406 100644 --- a/test/stress/framework/city.cpp +++ b/test/stress/framework/city.cpp @@ -559,6 +559,7 @@ static void CityHashCrc256Long(const char *s, size_t len, } if (len > 0) { s = s + len - 40; + // cppcheck-suppress uselessAssignmentPtrArg CHUNK(33); e ^= Rotate(a, 43); h += Rotate(b, 42); -- 2.34.1