diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-09-19 18:35:31 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-09-19 18:35:31 +0200 |
| commit | c22ea12219c711031ef9b5823f2d9eb1081261e9 (patch) | |
| tree | 89c2ec0f89d4b9d57cdfa22a7bee330d86b4cd24 /src/lib/openjp2/sparse_array.c | |
| parent | c84e594cffb181b96f522becf1ba0302e2cc6da7 (diff) | |
Workaroudn cppcheck (correct) warning about same code in then and else branches
Diffstat (limited to 'src/lib/openjp2/sparse_array.c')
| -rw-r--r-- | src/lib/openjp2/sparse_array.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/openjp2/sparse_array.c b/src/lib/openjp2/sparse_array.c index e7efdc96..73192924 100644 --- a/src/lib/openjp2/sparse_array.c +++ b/src/lib/openjp2/sparse_array.c @@ -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; @@ -249,6 +250,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 += block_width; |
