[compiler-rt] 561f4b9 - Fix -Wunused-but-set-variable warning in msan_test.cpp

Evgenii Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 12:07:35 PDT 2021


Author: Evgenii Stepanov
Date: 2021-04-27T12:07:13-07:00
New Revision: 561f4b9087457e9ea3cf4aeb57dcd507e2fa6258

URL: https://github.com/llvm/llvm-project/commit/561f4b9087457e9ea3cf4aeb57dcd507e2fa6258
DIFF: https://github.com/llvm/llvm-project/commit/561f4b9087457e9ea3cf4aeb57dcd507e2fa6258.diff

LOG: Fix -Wunused-but-set-variable warning in msan_test.cpp

Added: 
    

Modified: 
    compiler-rt/lib/msan/tests/msan_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/msan/tests/msan_test.cpp b/compiler-rt/lib/msan/tests/msan_test.cpp
index 5dc9090f36c0..daf80bb23efe 100644
--- a/compiler-rt/lib/msan/tests/msan_test.cpp
+++ b/compiler-rt/lib/msan/tests/msan_test.cpp
@@ -3608,8 +3608,7 @@ TEST(MemorySanitizer, getpwnam_r_positive) {
   strncpy(s, "abcd", 5);
   __msan_poison(s, 5);
   char buf[10000];
-  int res;
-  EXPECT_UMR(res = getpwnam_r(s, &pwd, buf, sizeof(buf), &pwdres));
+  EXPECT_UMR(getpwnam_r(s, &pwd, buf, sizeof(buf), &pwdres));
 }
 
 TEST(MemorySanitizer, getgrnam_r) {


        


More information about the llvm-commits mailing list