Re: [Xen-devel] [PATCH 2/3] tools/xenpmd: fix potential string truncation

2017-06-28 Thread Wei Liu
On Tue, Jun 27, 2017 at 07:35:44PM +0200, Marek Marczykowski-Górecki wrote: > GCC 7 warns (and thanks to -Werror, fails) about potential string > truncation by snprintf in get_next_battery_file. Since the code already > check if string is no longer than 4 chars, tell gcc about it. > >

[Xen-devel] [PATCH 2/3] tools/xenpmd: fix potential string truncation

2017-06-27 Thread Marek Marczykowski-Górecki
GCC 7 warns (and thanks to -Werror, fails) about potential string truncation by snprintf in get_next_battery_file. Since the code already check if string is no longer than 4 chars, tell gcc about it. Signed-off-by: Marek Marczykowski-Górecki ---