瀏覽代碼

Fix uninitialized variable in GoogleTest framework

Patrick-Christopher Mattulat 2 年之前
父節點
當前提交
98af4a5c57
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/lib/googletest-1.8.1/googletest/src/gtest-death-test.cc

+ 1 - 1
test/lib/googletest-1.8.1/googletest/src/gtest-death-test.cc

@@ -1219,7 +1219,7 @@ static void StackLowerThanAddress(const void* ptr, bool* result) {
 // Make sure AddressSanitizer does not tamper with the stack here.
 GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
 static bool StackGrowsDown() {
-  int dummy;
+  int dummy{};
   bool result;
   StackLowerThanAddress(&dummy, &result);
   return result;