mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-01 03:45:29 +00:00
DM: fix build error with gcc-8.
gcc8 showed following errors when build DM: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] It looks like wrong parameter was given to strncpy. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
9422f3e287
commit
01c8053dfb
@ -921,7 +921,7 @@ basl_make_templates(void)
|
||||
len--;
|
||||
basl_template[len] = '/';
|
||||
strncpy(&basl_template[len + 1], ASL_TEMPLATE,
|
||||
sizeof(ASL_TEMPLATE));
|
||||
MAXPATHLEN - len - 1);
|
||||
} else
|
||||
err = -1;
|
||||
|
||||
@ -934,10 +934,10 @@ basl_make_templates(void)
|
||||
strncpy(basl_stemplate, tmpdir, len);
|
||||
basl_stemplate[len] = '/';
|
||||
strncpy(&basl_stemplate[len + 1], ASL_TEMPLATE,
|
||||
sizeof(ASL_TEMPLATE));
|
||||
MAXPATHLEN - len - 1);
|
||||
len += sizeof(ASL_TEMPLATE);
|
||||
strncpy(&basl_stemplate[len], ASL_SUFFIX,
|
||||
sizeof(ASL_SUFFIX));
|
||||
sizeof(ASL_TEMPLATE));
|
||||
} else
|
||||
err = -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user