Re: [PATCH] Input: analog - fix invalid snprintf() call

2021-03-23 Thread Dmitry Torokhov
On Tue, Mar 23, 2021 at 02:29:15PM +0100, Rasmus Villemoes wrote: > On 23/03/2021 14.14, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > overlapping input and output arguments to snprintf() are > > undefined behavior in C99: > > > > Good luck: >

Re: [PATCH] Input: analog - fix invalid snprintf() call

2021-03-23 Thread Rasmus Villemoes
On 23/03/2021 14.14, Arnd Bergmann wrote: > From: Arnd Bergmann > > overlapping input and output arguments to snprintf() are > undefined behavior in C99: > Good luck: https://lore.kernel.org/lkml/1457469654-17059-1-git-send-email-li...@rasmusvillemoes.dk/ At least 5 years ago the consensus

[PATCH] Input: analog - fix invalid snprintf() call

2021-03-23 Thread Arnd Bergmann
From: Arnd Bergmann overlapping input and output arguments to snprintf() are undefined behavior in C99: drivers/input/joystick/analog.c: In function 'analog_name': drivers/input/joystick/analog.c:428:3: error: 'snprintf' argument 4 overlaps destination object 'analog' [-Werror=restrict] 428