Re: [PATCH v1 1/1] virtio_console: Get rid of unneeded temporary variable

2025-02-12 Thread Amit Shah
On Mon, 2025-02-10 at 11:59 +0200, Andy Shevchenko wrote: > When compiling a kernel with GCC using `make W=1` with > CONFIG_WERROR=y > (which is default nowadays), the build fails: > > drivers/char/virtio_console.c:1427:9: note: ‘snprintf’ output between > 9 and 27 bytes into a destination of size

[PATCH v1 1/1] virtio_console: Get rid of unneeded temporary variable

2025-02-10 Thread Andy Shevchenko
When compiling a kernel with GCC using `make W=1` with CONFIG_WERROR=y (which is default nowadays), the build fails: drivers/char/virtio_console.c:1427:9: note: ‘snprintf’ output between 9 and 27 bytes into a destination of size 16 Indeed, GCC can't see the limits of the variables that are in us