Mercurial > mplayer.hg
changeset 3837:6659db99f200
warning fix
author | pl |
---|---|
date | Fri, 28 Dec 2001 18:03:03 +0000 |
parents | beba5552ed2d |
children | 0fdab5847f76 |
files | cpudetect.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cpudetect.c Fri Dec 28 18:01:56 2001 +0000 +++ b/cpudetect.c Fri Dec 28 18:03:03 2001 +0000 @@ -3,6 +3,11 @@ CpuCaps gCpuCaps; +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif +#include <stdlib.h> + #ifdef ARCH_X86 #include <stdio.h> @@ -93,7 +98,8 @@ return; } do_cpuid(0x00000000, regs); // get _max_ cpuid level and vendor name - printf("CPU vendor name: %.4s%.4s%.4s max cpuid level: %d\n",®s[1],®s[3],®s[2],regs[0]); + printf("CPU vendor name: %.4s%.4s%.4s max cpuid level: %d\n", + (char*) (regs+1),(char*) (regs+3),(char*) (regs+2), regs[0]); if (regs[0]>=0x00000001) { char *tmpstr; @@ -173,7 +179,7 @@ exit(1); } - sprintf(vendor,"%.4s%.4s%.4s",®s[1],®s[3],®s[2]); + sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs+3),(char*)(regs+2)); for(i=0; i<MAX_VENDORS; i++){ if(!strcmp(cpuvendors[i].string,vendor)){