]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed signedness warning in calls to __cpuid and cpuidex.
authorNathan Moinvaziri <nathan@nathanm.com>
Sat, 23 May 2020 14:32:41 +0000 (07:32 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 30 May 2020 19:25:18 +0000 (21:25 +0200)
x86.c(29,22): warning C4057: 'function': 'int *' differs in indirection to slightly different base types from 'unsigned int [4]'
x86.c(43,24): warning C4057: 'function': 'int *' differs in indirection to slightly different base types from 'unsigned int [4]'

arch/x86/x86.c

index 12a531e9d1da24a49bee2a4bc47e89781925af77..92f9400451bc0e90d129cdc1acbfc933a6f6b16f 100644 (file)
@@ -26,7 +26,7 @@ ZLIB_INTERNAL int x86_cpu_has_tzcnt;
 static void cpuid(int info, unsigned* eax, unsigned* ebx, unsigned* ecx, unsigned* edx) {
 #ifdef _MSC_VER
     unsigned int registers[4];
-    __cpuid(registers, info);
+    __cpuid((int *)registers, info);
 
     *eax = registers[0];
     *ebx = registers[1];
@@ -40,7 +40,7 @@ static void cpuid(int info, unsigned* eax, unsigned* ebx, unsigned* ecx, unsigne
 static void cpuidex(int info, int subinfo, unsigned* eax, unsigned* ebx, unsigned* ecx, unsigned* edx) {
 #ifdef _MSC_VER
     unsigned int registers[4];
-    __cpuidex(registers, info, subinfo);
+    __cpuidex((int *)registers, info, subinfo);
 
     *eax = registers[0];
     *ebx = registers[1];