diff options
author | pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-12-28 18:03:03 +0000 |
---|---|---|
committer | pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-12-28 18:03:03 +0000 |
commit | 97699024c95aa839e9783a4d0968c566a5b6277b (patch) | |
tree | d05bb63057f960eab7df152ca0a2637bddbf5416 | |
parent | f0f34e3c513f6a61cfe7ea083ae03589411c4301 (diff) | |
download | mpv-97699024c95aa839e9783a4d0968c566a5b6277b.tar.bz2 mpv-97699024c95aa839e9783a4d0968c566a5b6277b.tar.xz |
warning fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3838 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | cpudetect.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpudetect.c b/cpudetect.c index e2fdfa75fd..b88c0c3488 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -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 @@ void GetCpuCaps( CpuCaps *caps) 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 @@ char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){ 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)){ |