mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Address compilation warning.
strategyselector.c:170:10: error: ‘__get_cpuid’ is static but used in inline function ‘get_cpuid’ which is not static [-Werror] return __get_cpuid(level, eax, ebx, ecx, edx);
This commit is contained in:
parent
60ecc6baae
commit
d7abe6a7c2
|
@ -166,13 +166,13 @@ static void* strategyselector_choose_for(const strategy_list * const strategies,
|
|||
|
||||
#if defined(__GNUC__)
|
||||
#include <cpuid.h>
|
||||
INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
|
||||
static INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
|
||||
return __get_cpuid(level, eax, ebx, ecx, edx);
|
||||
}
|
||||
#else
|
||||
#include <intrin.h>
|
||||
//Adapter from __cpuid (VS) to __get_cpuid (GNU C).
|
||||
INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
|
||||
static INLINE int get_cpuid(unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) {
|
||||
int CPUInfo[4] = {*eax, *ebx, *ecx, *edx};
|
||||
__cpuid(CPUInfo, 0);
|
||||
// check if the CPU supports the cpuid instruction.
|
||||
|
|
Loading…
Reference in a new issue