Sadly TSAN still reports this as a race, even when we're obviously writing the
same values. Initializing with the declaration should quiet it down.
BUG=
R=caryclark@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/25713004
git-svn-id: http://skia.googlecode.com/svn/trunk@11574 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index c3162ab..28830ed 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -447,8 +447,9 @@
return errors2x2 > MAX_ERRORS ? errors2x2 : 0;
}
-static int testNumber;
-static const char* testName;
+// Default values for when reporter->verbose() is false.
+static int testNumber = 1;
+static const char* testName = "pathOpTest";
static void writeTestName(const char* nameSuffix, SkMemoryWStream& outFile) {
outFile.writeText(testName);
@@ -655,9 +656,6 @@
testNumber = atoi(numLoc) + 1;
}
}
- } else {
- testName = "pathOpTest";
- testNumber = 1;
}
return reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1;
}