]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
cast _xgetbv to int to silence conversion warning
authorHarmen Stoppels <me@harmenstoppels.nl>
Tue, 29 Aug 2023 12:31:12 +0000 (14:31 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 13 Sep 2023 09:54:42 +0000 (11:54 +0200)
cmake/detect-intrinsics.cmake
configure

index d8a3c285df8c4194bbc3a6fcbeaafe7863ea02c1..bc938fc234f86ad4082994c9af4edc1e8fde9aee 100644 (file)
@@ -507,7 +507,7 @@ macro(check_xsave_intrinsics)
         #else
         #  include <x86gprintrin.h>
         #endif
-        unsigned int f(unsigned int a) { return _xgetbv(a); }
+        unsigned int f(unsigned int a) { return (int) _xgetbv(a); }
         int main(void) { return 0; }"
         HAVE_XSAVE_INTRIN FAIL_REGEX "not supported")
     set(CMAKE_REQUIRED_FLAGS)
index e54db18ab0cf9e72c64445b8a3ccf3a05ed3ce6f..1c3c5da73a6e493515ebe1c9cb5022a3f32c7a0b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1233,7 +1233,7 @@ check_xsave_intrinsics() {
 #else
 #  include <x86gprintrin.h>
 #endif
-unsigned int f(unsigned int a) { return _xgetbv(a); }
+unsigned int f(unsigned int a) { return (int) _xgetbv(a); }
 int main(void) { return 0; }
 EOF
     if try ${CC} ${CFLAGS} ${xsaveflag} $test.c; then