فهرست منبع

clang-tidy: muted "use of memory after it is freed" in MemoryPool

Benoit Blanchon 4 سال پیش
والد
کامیت
a24edac5a9
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/ArduinoJson/Memory/MemoryPool.hpp

+ 2 - 1
src/ArduinoJson/Memory/MemoryPool.hpp

@@ -37,7 +37,8 @@ class MemoryPool {
   }
 
   void* buffer() {
-    return _begin;
+    return _begin;  // NOLINT(clang-analyzer-unix.Malloc)
+                    // movePointers() alters this pointer
   }
 
   // Gets the capacity of the memoryPool in bytes