From: Nathan Moinvaziri Date: Sat, 23 May 2020 14:32:41 +0000 (-0700) Subject: Fixed signedness warning in calls to __cpuid and cpuidex. X-Git-Tag: 1.9.9-b1~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3afff15f55bc9f574765b6caa7e6697ebf39731;p=thirdparty%2Fzlib-ng.git Fixed signedness warning in calls to __cpuid and cpuidex. 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]' --- diff --git a/arch/x86/x86.c b/arch/x86/x86.c index 12a531e9..92f94004 100644 --- a/arch/x86/x86.c +++ b/arch/x86/x86.c @@ -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];