]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
clang-analyzer-cplusplus.NewDelete
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Thu, 30 May 2024 13:40:55 +0000 (16:40 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Thu, 30 May 2024 13:40:55 +0000 (16:40 +0300)
src/util/pack_bits.h
src/util/partial_store.h
src/util/unaligned.h

index 800ce25ec7b71e454300c6dab98bd57355b74419..9c1ee157ee110ef8f81fc710c2a0adf121709982 100644 (file)
@@ -190,7 +190,6 @@ static really_inline
 void unpack_bits_64(u64a *v, const u8 *in, const u32 *bits,
                     const unsigned int elements) {
     u32 used = 0; // bits used from *in
-
     for (unsigned int i = 0; i < elements; i++) {
         assert(bits[i] <= 64);
         u64a v_out = 0;  // accumulator for v[i]
@@ -198,7 +197,7 @@ void unpack_bits_64(u64a *v, const u8 *in, const u32 *bits,
         u32 vidx = 0;    // bits written to v[i]
 
         while (b) {
-            u64a read = *in >> used;
+            u64a read = *in >> used;  //NOLINT (clang-analyzer-cplusplus.NewDelete)
             u32 bits_read = 8 - used;
 
             if (b <= bits_read) {
index efe357ccc7943ceff457b712b05a9e464696a894..a75a1be6f05bf86c4dbaea93c404618de3ba2b87 100644 (file)
@@ -122,7 +122,7 @@ void partial_store_u64a(void *ptr, u64a value, u32 numBytes) {
         break;
     case 1:
         // cppcheck-suppress cstyleCast
-        *(u8 *)ptr = (u8)value;
+        *(u8 *)ptr = (u8)value;     //NOLINT (clang-analyzer-cplusplus.NewDelete)
         break;
     case 0:
         break;
@@ -167,7 +167,7 @@ u64a partial_load_u64a(const void *ptr, u32 numBytes) {
         return value;
     case 1:
         // cppcheck-suppress cstyleCast
-        value = *(const u8 *)ptr;
+        value = *(const u8 *)ptr; 
         return value;
     case 0:
         break;
index e4c7790018dbd0a949986db7c85ac26d98670b8d..661750a7e09f616e8493d0574801692e2b7f3dc6 100644 (file)
@@ -73,7 +73,7 @@ void unaligned_store_u16(void *ptr, u16 val) {
     struct unaligned { u16 u; } PACKED__MAY_ALIAS;
     // cppcheck-suppress cstyleCast
     struct unaligned *uptr = (struct unaligned *)ptr;
-    uptr->u = val;
+    uptr->u = val;  //NOLINT    (clang-analyzer-cplusplus.NewDelete)
 }
 
 /// Perform an unaligned 32-bit store
@@ -82,7 +82,7 @@ void unaligned_store_u32(void *ptr, u32 val) {
     struct unaligned { u32 u; } PACKED__MAY_ALIAS;
     // cppcheck-suppress cstyleCast
     struct unaligned *uptr = (struct unaligned *)ptr;
-    uptr->u = val;
+    uptr->u = val;  //NOLINT    (clang-analyzer-cplusplus.NewDelete)
 }
 
 /// Perform an unaligned 64-bit store
@@ -91,7 +91,7 @@ void unaligned_store_u64a(void *ptr, u64a val) {
     struct unaligned { u64a u; } PACKED__MAY_ALIAS;
     // cppcheck-suppress cstyleCast
     struct unaligned *uptr = (struct unaligned *)ptr;
-    uptr->u = val;
+    uptr->u = val;  //NOLINT    (clang-analyzer-cplusplus.NewDelete)
 }
 
 #undef PACKED__MAY_ALIAS