From: Phil Yang Date: Tue, 28 Apr 2020 14:37:07 +0000 (+0800) Subject: trace: fix build with gcc 10 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b2f8a22e79dc6fbdf40d6f3ec1a24a37438c7840;hp=b2f8a22e79dc6fbdf40d6f3ec1a24a37438c7840;p=dpdk.git trace: fix build with gcc 10 Prevent from writing beyond the allocated memory. 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/", optarg); | ^ Fixes: 8af866df8d8c ("trace: add trace directory configuration parameter") Signed-off-by: Phil Yang Reviewed-by: Lijian Zhang Tested-by: Lijian Zhang Acked-by: Sunil Kumar Kori Signed-off-by: David Marchand ---