mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 21:29:20 +00:00
build: fix build issue with latest gcc
Fix build issues with gcc 9.1 version Tracked-On: #3121 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -355,7 +355,7 @@ static int create_hugetlb_dirs(int level)
|
||||
}
|
||||
|
||||
memset(tmp_path, '\0', MAX_PATH_LEN);
|
||||
strncpy(tmp_path, path, MAX_PATH_LEN);
|
||||
strncpy(tmp_path, path, MAX_PATH_LEN - 1);
|
||||
|
||||
if ((tmp_path[len - 1] != '/') && (len < MAX_PATH_LEN - 1))
|
||||
tmp_path[len] = '/';
|
||||
|
@@ -279,7 +279,8 @@ int set_wakeup_timer(time_t t)
|
||||
|
||||
req.data.rtc_timer.t = t;
|
||||
strncpy(req.data.rtc_timer.vmname, vmname,
|
||||
sizeof(req.data.rtc_timer.vmname));
|
||||
sizeof(req.data.rtc_timer.vmname) - 1);
|
||||
req.data.rtc_timer.vmname[sizeof(req.data.rtc_timer.vmname) - 1] = 0;
|
||||
|
||||
memset(&ack, 0, sizeof(struct mngr_msg));
|
||||
ret = mngr_send_msg(acrnd_fd, &req, &ack, 2);
|
||||
|
Reference in New Issue
Block a user