Arnd Bergmann
1f59342be6
Input: analog - fix invalid snprintf() call
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 | snprintf(analog->name, sizeof(analog->name), "%s %d-hat",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
429 | analog->name, hweight16(analog->mask & ANALOG_HATS_ALL));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/joystick/analog.c:420:40: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
420 | static void analog_name(struct analog *analog)
| ~~~~~~~~~~~~~~~^~~~~~
Change this function to use the simpler seq_buf interface instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210927101416.1569609-1-arnd@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-10-05 13:28:41 -07:00
..
2019-08-06 09:10:57 -07:00
2019-05-30 11:26:35 -07:00
2020-09-28 16:26:11 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-10-05 13:28:41 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2020-07-07 11:25:54 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2019-05-30 11:26:35 -07:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-06-18 21:28:20 -07:00
2019-05-30 11:26:35 -07:00
2021-06-18 21:28:20 -07:00
2019-05-21 10:50:45 +02:00
2021-03-09 21:41:28 -08:00
2019-10-29 17:13:36 -07:00
2018-07-25 19:04:19 +00:00
2021-06-18 21:28:20 -07:00
2020-07-07 11:25:54 -07:00
2020-07-07 11:25:54 -07:00
2019-05-30 11:26:35 -07:00
2019-05-24 17:27:10 +02:00
2021-09-20 21:59:50 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:27:10 +02:00
2021-05-06 15:10:34 -07:00
2019-05-30 11:26:35 -07:00