[compiler-rt] r260132 - [asan] fix the Windows build (MSVC says: cannot specify explicit initializer for arrays)

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 11:33:36 PST 2016


Author: kcc
Date: Mon Feb  8 13:33:36 2016
New Revision: 260132

URL: http://llvm.org/viewvc/llvm-project?rev=260132&view=rev
Log:
[asan] fix the Windows build (MSVC says: cannot specify explicit initializer for arrays)

Modified:
    compiler-rt/trunk/lib/asan/asan_scariness_score.h

Modified: compiler-rt/trunk/lib/asan/asan_scariness_score.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_scariness_score.h?rev=260132&r1=260131&r2=260132&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_scariness_score.h (original)
+++ compiler-rt/trunk/lib/asan/asan_scariness_score.h Mon Feb  8 13:33:36 2016
@@ -36,7 +36,9 @@
 namespace __asan {
 class ScarinessScore {
  public:
-  ScarinessScore() {}
+  ScarinessScore() {
+    descr[0] = 0;
+  }
   void Scare(int add_to_score, const char *reason) {
     if (descr[0])
       internal_strlcat(descr, "-", sizeof(descr));
@@ -57,7 +59,7 @@ class ScarinessScore {
 
  private:
   int score = 0;
-  char descr[1024] = {0};
+  char descr[1024];
 };
 
 }  // namespace __asan




More information about the llvm-commits mailing list