From bed4df0f6ae930b42cd4c80da5de39538d4f1ae8 Mon Sep 17 00:00:00 2001 From: w_angrong Date: Sat, 8 Aug 2020 18:25:58 +0800 Subject: [PATCH] codeCheck: fix code check warning --- .../shared/OpenglCodecCommon/GLDecoderContextData.h | 2 +- src/anbox/cmds/system_info.cpp | 2 +- src/anbox/common/small_vector.h | 1 + src/anbox/graphics/buffer_queue.h | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/external/android-emugl/shared/OpenglCodecCommon/GLDecoderContextData.h b/external/android-emugl/shared/OpenglCodecCommon/GLDecoderContextData.h index 3a6ee178..f8720bf8 100644 --- a/external/android-emugl/shared/OpenglCodecCommon/GLDecoderContextData.h +++ b/external/android-emugl/shared/OpenglCodecCommon/GLDecoderContextData.h @@ -52,7 +52,7 @@ public: mNumLocations(static_cast(numLocations)) { mPointerData.resize(mNumLocations); } - + ~GLDecoderContextData(){} // Store |len| bytes from |data| into the buffer associated with // vertex attribute index |loc|. void storePointerData(unsigned int loc, void *data, size_t len) { diff --git a/src/anbox/cmds/system_info.cpp b/src/anbox/cmds/system_info.cpp index b9994176..41d73322 100644 --- a/src/anbox/cmds/system_info.cpp +++ b/src/anbox/cmds/system_info.cpp @@ -54,7 +54,7 @@ class SystemInformation { collect_kernel_info(); collect_graphics_info(); } - + ~SystemInformation() {} std::string to_text() const { std::stringstream s; diff --git a/src/anbox/common/small_vector.h b/src/anbox/common/small_vector.h index 74f5f0d1..88355df3 100644 --- a/src/anbox/common/small_vector.h +++ b/src/anbox/common/small_vector.h @@ -153,6 +153,7 @@ class SmallVector { this->destruct(this->begin(), this->end()); if (isAllocated()) { free(this->mBegin); + this->mBegin = nullptr; } } diff --git a/src/anbox/graphics/buffer_queue.h b/src/anbox/graphics/buffer_queue.h index 6060a84f..8169ad27 100644 --- a/src/anbox/graphics/buffer_queue.h +++ b/src/anbox/graphics/buffer_queue.h @@ -40,6 +40,7 @@ class BufferQueue { int try_pop_locked(Buffer *buffer); int pop_locked(Buffer *buffer, std::unique_lock &lock); void close_locked(); + ~BufferQueue() {} private: size_t capacity_ = 0; -- GitLab