Changed cmake version test to allow for cmake 2.8.11.x
[openjpeg.git] / src / lib / openjp2 / sparse_array.c
index 9d86eb6e7793793e236f3ded5aabdbc2ba931865..73192924eddcef37e24e6138faef09f4b62bd73a 100644 (file)
@@ -170,6 +170,7 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write(
                         if (x_incr == 4) {
                             /* Same code as general branch, but the compiler */
                             /* can have an efficient memcpy() */
+                            (void)(x_incr); /* trick to silent cppcheck duplicateBranch warning */
                             for (j = 0; j < y_incr; j++) {
                                 memcpy(dest_ptr, src_ptr, sizeof(OPJ_INT32) * x_incr);
                                 dest_ptr += buf_line_stride;
@@ -247,8 +248,9 @@ static OPJ_BOOL opj_sparse_array_int32_read_or_write(
                     const OPJ_INT32* OPJ_RESTRICT src_ptr = buf + (y - y0) *
                                                             (OPJ_SIZE_T)buf_line_stride + (x - x0) * buf_col_stride;
                     if (x_incr == 4) {
-                        // Same code as general branch, but the compiler
-                        // can have an efficient memcpy()
+                        /* Same code as general branch, but the compiler */
+                        /* can have an efficient memcpy() */
+                        (void)(x_incr); /* trick to silent cppcheck duplicateBranch warning */
                         for (j = 0; j < y_incr; j++) {
                             memcpy(dest_ptr, src_ptr, sizeof(OPJ_INT32) * x_incr);
                             dest_ptr += block_width;