summaryrefslogtreecommitdiff
path: root/src/cpuinfo/SDL_cpuinfo.c
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2014-12-26 23:16:54 -0500
committerRyan C. Gordon <icculus@icculus.org>2014-12-26 23:16:54 -0500
commit2bdda97c7710d327a1993a521530c1a4f5cbba32 (patch)
tree833b78bb4a78cfd2003c203f282a9c4740449b94 /src/cpuinfo/SDL_cpuinfo.c
parent3557a421920fb5c7108ae38866a91c014be9ad29 (diff)
Cleaned up some compiler warnings.
Diffstat (limited to 'src/cpuinfo/SDL_cpuinfo.c')
-rw-r--r--src/cpuinfo/SDL_cpuinfo.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index f4e4e93af4..48e8001f3a 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -458,10 +458,11 @@ SDL_GetCPUType(void)
if (!SDL_CPUType[0]) {
int i = 0;
- int a, b, c, d;
if (CPU_haveCPUID()) {
+ int a, b, c, d;
cpuid(0x00000000, a, b, c, d);
+ (void) a;
SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8;
SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8;
SDL_CPUType[i++] = (char)(b & 0xff); b >>= 8;
@@ -563,15 +564,12 @@ int
SDL_GetCPUCacheLineSize(void)
{
const char *cpuType = SDL_GetCPUType();
-
+ int a, b, c, d;
+ (void) a; (void) b; (void) c; (void) d;
if (SDL_strcmp(cpuType, "GenuineIntel") == 0) {
- int a, b, c, d;
-
cpuid(0x00000001, a, b, c, d);
return (((b >> 8) & 0xff) * 8);
} else if (SDL_strcmp(cpuType, "AuthenticAMD") == 0) {
- int a, b, c, d;
-
cpuid(0x80000005, a, b, c, d);
return (c & 0xff);
} else {