1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-11-10 22:59:13 +00:00

Resolve warnings on Mac OS X.

This commit is contained in:
Veselin Georgiev 2016-06-06 01:50:05 +03:00
parent dbf9991553
commit 24d7c318d0
2 changed files with 8 additions and 1 deletions

View file

@ -589,3 +589,5 @@ uint8_t cc_x64driver_code[5120] = {
}; };
//} end //} end
#endif // _WIN32 #endif // _WIN32
int msrdriver_dummy; // a dummy to avoid a linker warning on OS X.

View file

@ -463,8 +463,11 @@ int cpu_msr_driver_close(struct msr_driver_t* drv)
/* endif defined (_WIN32) */ /* endif defined (_WIN32) */
#else /* Unsupported OS */ #else /* Unsupported OS */
/* On others OS (lie Darwin), we still do not support RDMSR, so supply dummy struct /* On others OS (i.e., Darwin), we still do not support RDMSR, so supply dummy struct
and functions */ and functions */
#define RDMSR_UNSUPPORTED_OS
struct msr_driver_t { int dummy; }; struct msr_driver_t { int dummy; };
struct msr_driver_t* cpu_msr_driver_open(void) struct msr_driver_t* cpu_msr_driver_open(void)
{ {
@ -502,6 +505,7 @@ int cpu_msrinfo(struct msr_driver_t* driver, cpu_msrinfo_request_t which)
#endif /* Unsupported OS */ #endif /* Unsupported OS */
#ifndef RDMSR_UNSUPPORTED_OS
/* Useful links for hackers: /* Useful links for hackers:
- AMD MSRs: - AMD MSRs:
@ -837,3 +841,4 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
} }
#endif // MSRINFO_DEFINED #endif // MSRINFO_DEFINED
#endif // RDMSR_UNSUPPORTED_OS