Common/x64/CpuDetect: Disable MSVC warning for strncpy
This commit is contained in:
parent
4c0a85f3b3
commit
d31bbd6d14
1 changed files with 10 additions and 0 deletions
|
@ -81,8 +81,18 @@ static CPUCaps Detect() {
|
|||
else
|
||||
caps.vendor = CPUVendor::OTHER;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
// Set reasonable default brand string even if brand string not available
|
||||
strncpy(caps.cpu_string, caps.brand_string, sizeof(caps.cpu_string));
|
||||
caps.cpu_string[sizeof(caps.cpu_string) - 1] = '\0';
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
// Detect family and other miscellaneous features
|
||||
if (max_std_fn >= 1) {
|
||||
|
|
Loading…
Reference in a new issue