tools: acrn-manager: fix warnings before updating Makefile

- Print warning if string truncated to avoid the warning generated
  by -Wformat-truncation by GCC 7.0 and newer version;
- fixed strncpy size.

Tracked-On: #1122
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yan, Like
2018-09-20 09:13:05 +08:00
committed by lijinxia
parent 270a833283
commit 227a8c436b
2 changed files with 5 additions and 2 deletions

View File

@@ -175,7 +175,7 @@ static int load_timer_list(void)
}
memset(arg.name, 0, sizeof(arg.name));
strncpy(arg.name, s1, sizeof(s1));
strncpy(arg.name, s1, sizeof(arg.name));
expire = strtoul(s2, NULL, 10);
if (expire == 0 || errno == ERANGE) {