Skip to content

Commit 89723ca

Browse files
Merge pull request #597 from kswiecicki/windows-intrin-war
Suppress warning 28251 for intrin.h
2 parents f9c8d0d + dc39128 commit 89723ca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/utils/utils_windows_math.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@
88
*/
99

1010
#include "utils_math.h"
11+
12+
// disable warning 28251: "inconsistent annotation for function" thrown in
13+
// intrin.h, as we do not want to modify this file
14+
#if defined(_MSC_VER)
15+
#pragma warning(push)
16+
#pragma warning(disable : 28251)
17+
#endif // _MSC_VER
18+
1119
#include <intrin.h>
1220

21+
#if defined(_MSC_VER)
22+
#pragma warning(pop)
23+
#endif // _MSC_VER
24+
1325
#pragma intrinsic(_BitScanReverse)
1426

1527
// Retrieves the position of the leftmost set bit.

0 commit comments

Comments
 (0)