Fix 'strncpy' truncating warnings when compiling with gcc 8
Change-Id: Ib145bab9450281da05f70dea34433b83438a756b Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
This commit is contained in:
committad av
Felix Kuehling
förälder
4eaaf9694d
incheckning
89e35574e3
+1
-1
@@ -669,7 +669,7 @@ static HSAKMT_STATUS topology_get_cpu_model_name(HsaNodeProperties *props,
|
||||
if (props->CComputeIdLo == apic_id) {
|
||||
/* Retrieve the CAL name of CPU node */
|
||||
if (!is_apu)
|
||||
strncpy((char *)props->AMDName, cpu_model_name, sizeof(props->AMDName)-1);
|
||||
strncpy((char *)props->AMDName, cpu_model_name, sizeof(props->AMDName));
|
||||
/* Convert from UTF8 to UTF16 */
|
||||
for (i = 0; cpu_model_name[i] != '\0' && i < HSA_PUBLIC_NAME_SIZE - 1; i++)
|
||||
props->MarketingName[i] = cpu_model_name[i];
|
||||
|
||||
Referens i nytt ärende
Block a user