Chromium Code Reviews| 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; |