Skip to content

Commit

Permalink
Merge pull request #597 from kswiecicki/windows-intrin-war
Browse files Browse the repository at this point in the history
Suppress warning 28251 for intrin.h
  • Loading branch information
lukaszstolarczuk authored Jul 4, 2024
2 parents f9c8d0d + dc39128 commit 89723ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/utils/utils_windows_math.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@
*/

#include "utils_math.h"

// disable warning 28251: "inconsistent annotation for function" thrown in
// intrin.h, as we do not want to modify this file
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 28251)
#endif // _MSC_VER

#include <intrin.h>

#if defined(_MSC_VER)
#pragma warning(pop)
#endif // _MSC_VER

#pragma intrinsic(_BitScanReverse)

// Retrieves the position of the leftmost set bit.
Expand Down

0 comments on commit 89723ca

Please sign in to comment.