Re: [dpdk-dev] [PATCH] trace: fix build with gcc 10

2020-04-28 Thread Phil Yang
> -Original Message- > From: Stephen Hemminger > Sent: Tuesday, April 28, 2020 12:59 AM > To: Phil Yang > Cc: jer...@marvell.com; sk...@marvell.com; dev@dpdk.org; > david.march...@redhat.com; Lijian Zhang ; > Ruifeng Wang ; nd > Subject: Re: [dpdk-dev] [PATCH] t

Re: [dpdk-dev] [PATCH] trace: fix build with gcc 10

2020-04-27 Thread Stephen Hemminger
On Tue, 28 Apr 2020 00:47:38 +0800 Phil Yang wrote: > - if (strlen(optarg) >= size) { > + /* the specified trace directory name cannot > + * exceed PATH_MAX-1. > + */ > + if (strlen(optarg) >= (size - 1)) { > trace_err("input string is too big"); strnlen() is

[dpdk-dev] [PATCH] trace: fix build with gcc 10

2020-04-27 Thread Phil Yang
GCC 10 compiling output: eal_common_trace_utils.c: In function 'eal_trace_dir_args_save': eal_common_trace_utils.c:290:24: error: '__builtin___sprintf_chk' \ may write a terminating nul past the end of the destination \ [-Werror=format-overflow=] 290 | sprintf(dir_path, "%s/",