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

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: 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..d432487fe7f6e19d60a4c4e37808694c2cf9938b 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_
mtklein 2015/01/30 16:07:54 Can't hurt to add '// /analyze enabled'
brucedawson 2015/01/30 17:38:06 Done.
+#pragma warning(disable: 6102) // Using 'index' from failed function call
bungeman-skia 2015/01/30 15:49:22 Can we push and pop this? I feel uncomfortable mak
brucedawson 2015/01/30 17:38:06 Good catch. I meant to use #pragma warning(suppres
+#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