Commit cee5f8c9 authored by Matthias Braun's avatar Matthias Braun
Browse files

fix warning

parent 2f448650
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
*/ */
#include "config.h" #include "config.h"
#include <stdbool.h>
#include "lc_opts.h" #include "lc_opts.h"
#include "lc_opts_enum.h" #include "lc_opts_enum.h"
...@@ -762,9 +763,10 @@ static void x86_cpuid(cpuid_registers *regs, unsigned level) ...@@ -762,9 +763,10 @@ static void x86_cpuid(cpuid_registers *regs, unsigned level)
#endif #endif
} }
static int x86_toogle_cpuid(void) static bool x86_toogle_cpuid(void)
{ {
unsigned eflags_before = 0, eflags_after = 0; unsigned eflags_before = 0;
unsigned eflags_after = 0;
#if defined(__GNUC__) #if defined(__GNUC__)
#ifdef __i386__ #ifdef __i386__
...@@ -781,8 +783,7 @@ static int x86_toogle_cpuid(void) ...@@ -781,8 +783,7 @@ static int x86_toogle_cpuid(void)
: "=r" (eflags_before), "=r" (eflags_after) :: "cc" : "=r" (eflags_before), "=r" (eflags_after) :: "cc"
); );
#else #else
/* cpuid always available on 64bit */ eflags_after = 0x00200000;
return true;
#endif #endif
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#if defined(_M_IX86) #if defined(_M_IX86)
...@@ -798,7 +799,7 @@ static int x86_toogle_cpuid(void) ...@@ -798,7 +799,7 @@ static int x86_toogle_cpuid(void)
mov eflags_after, eax mov eflags_after, eax
} }
#else #else
return true; eflags_after = 0x00200000;
#endif #endif
#endif #endif
return (eflags_before ^ eflags_after) & 0x00200000; return (eflags_before ^ eflags_after) & 0x00200000;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment