]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix UBSAN implicit conversion warning in test/test_deflate_concurrency.cc.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 15 Apr 2026 12:58:44 +0000 (14:58 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 16 Apr 2026 18:05:26 +0000 (20:05 +0200)
test/test_deflate_concurrency.cc

index 1297aee6446c6392e40c8893731983101cd1aeb3..1ab8de072b392df50e3b053bcf810662e490919b 100644 (file)
@@ -55,8 +55,9 @@ private:
                 continue;
             if (m_state == State::STOPPED)
                 break;
-            for (uint8_t & i: buf)
-                i++;
+            for (size_t i = 0; i < sizeof(buf); i++) {
+                buf[i] = (uint8_t)(buf[i] + 1);
+            }
         }
     }