Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Unified Diff: src/core/SkPath.cpp

Issue 2030713002: Fix uninit warning on valgrind bot in SkPathPriv:IsSimpleClosedRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 84181a38e7828a58cf99f5d6d55a3df7f5aaeae0..bf27372a56e5337de76c9f3ee3be29832bd34ff2 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -3295,8 +3295,8 @@ bool SkPathPriv::IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Di
int verticalCnt = 0;
int horizontalCnt = 0;
// dirs are 0 - right, 1 - down, 2 - left, 3 - up.
- int firstDir;
- int secondDir;
+ int firstDir = 0;
+ int secondDir = 0;
SkRect tempRect;
for (int i = 0; i < 4; ++i) {
int sameCnt = 0;
@@ -3365,7 +3365,7 @@ bool SkPathPriv::IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Di
} else {
SkASSERT(((secondDir + 1) & 0b11) == firstDir);
*direction = SkPath::kCCW_Direction;
- *start = secondDir;
+ *start = secondDir;
}
*rect = tempRect;
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698