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

Unified Diff: tests/MathTest.cpp

Issue 1503423003: ubsan shift fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add cast to work around win compiler Created 5 years 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 | « src/utils/SkDashPath.cpp ('k') | tests/RandomTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MathTest.cpp
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 3c2bc644073ddcd211e732c645a28fd894a4b00d..24e46f3097aea20d0f62277dd74aae2dd44eb5c2 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -561,7 +561,7 @@ DEF_TEST(Math, reporter) {
SkFixed numer = rand.nextS();
SkFixed denom = rand.nextS();
SkFixed result = SkFixedDiv(numer, denom);
- int64_t check = ((int64_t)numer << 16) / denom;
+ int64_t check = SkLeftShift((int64_t)numer, 16) / denom;
(void)SkCLZ(numer);
(void)SkCLZ(denom);
« no previous file with comments | « src/utils/SkDashPath.cpp ('k') | tests/RandomTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698