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

Unified Diff: include/core/SkMath.h

Issue 872673007: Disable the noisiest /analyze warning in Chrome. ~3,700/12,000 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added comment. Created 5 years, 11 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: include/core/SkMath.h
diff --git a/include/core/SkMath.h b/include/core/SkMath.h
index 014f014debb771575af495aad5469498bebbf6cd..884ef22918dfbaa9a2da35c848ef4b7bc487e8d3 100644
--- a/include/core/SkMath.h
+++ b/include/core/SkMath.h
@@ -79,6 +79,11 @@ int SkCLZ_portable(uint32_t);
if (mask) {
DWORD index;
_BitScanReverse(&index, mask);
+ // Suppress this bogus /analyze warning. The check for non-zero
+ // guarantees that _BitScanReverse will succeed.
+#ifdef _PREFAST_ // /analyze enabled
bungeman-skia 2015/01/30 18:10:54 I took a look, and it looks like warning 6102 is s
+#pragma warning(suppress : 6102) // Using 'index' from failed function call
+#endif
return index ^ 0x1F;
} else {
return 32;
« 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