diff options
author | 2021-10-05 13:27:26 -0700 | |
---|---|---|
committer | 2021-10-05 13:28:41 -0700 | |
commit | 1f59342be6c075a9520679981c4cfd08bb26c659 (patch) | |
tree | ac633291fc0b16bed4bc39370716717a66a03c2d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Input: ariel-pwrbutton - add SPI device ID table (diff) | |
download | wireguard-linux-1f59342be6c075a9520679981c4cfd08bb26c659.tar.xz wireguard-linux-1f59342be6c075a9520679981c4cfd08bb26c659.zip |
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions