[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] tools/xenpmd: Fix gcc10 snprintf warning



On Thu, Oct 15, 2020 at 10:16:09AM +0100, Bertrand Marquis wrote:
> Add a check for snprintf return code and ignore the entry if we get an
> error. This should in fact never happen and is more a trick to make gcc
> happy and prevent compilation errors.
> 
> This is solving the following gcc warning when compiling for arm32 host
> platforms with optimization activated:
> xenpmd.c:92:37: error: '%s' directive output may be truncated writing
> between 4 and 2147483645 bytes into a region of size 271
> [-Werror=format-truncation=]
> 
> This is also solving the following Debian bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970802
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Acked-by: Wei Liu <wl@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.