projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
13c096f
)
Fix a warning with POPCNT and MSVC
author
Marco Costalba
<mcostalba@gmail.com>
Sun, 21 Feb 2010 12:44:36 +0000 (13:44 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Sun, 21 Feb 2010 12:44:36 +0000 (13:44 +0100)
Intrinsic __popcnt64() returns an unsigned __int64, cast
to an integer and silence the warning.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/bitcount.h
patch
|
blob
|
history
diff --git
a/src/bitcount.h
b/src/bitcount.h
index
b32314d
..
7a05970
100644
(file)
--- a/
src/bitcount.h
+++ b/
src/bitcount.h
@@
-51,7
+51,7
@@
inline bool cpu_has_popcnt() {
return (CPUInfo[2] >> 23) & 1;
}
-#define POPCNT_INTRINSIC(x) __popcnt64(x)
+#define POPCNT_INTRINSIC(x) (int)__popcnt64(x)
#elif defined(__GNUC__) && defined(USE_POPCNT) // Gcc compiler