linux/drivers/media/usb
Arnd Bergmann d82cf24859 media: usbvision-i2c: fix format overflow warning
gcc-7 notices that we copy a fixed length string into another
string of the same size, with additional characters:

drivers/media/usb/usbvision/usbvision-i2c.c: In function 'usbvision_i2c_register':
drivers/media/usb/usbvision/usbvision-i2c.c:190:36: error: '%d' directive writing between 1 and 11 bytes into a region of size between 0 and 47 [-Werror=format-overflow=]
  sprintf(usbvision->i2c_adap.name, "%s-%d-%s", i2c_adap_template.name,
                                    ^~~~~~~~~~
drivers/media/usb/usbvision/usbvision-i2c.c:190:2: note: 'sprintf' output between 4 and 76 bytes into a destination of size 48

Using snprintf() makes the code more robust in general, but will still
trigger a possible warning about truncation in the string.
We know this won't happen as the template name is always "usbvision", so
we can easily avoid the warning as well by using this as the format string
directly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20 06:58:28 -04:00
..
airspy [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
as102 media: usb: as102: as102_usb_drv: don't print error when allocating urb fails 2016-08-30 19:13:53 +02:00
au0828 media: Replace initalized ->initialized 2017-06-24 15:46:24 -03:00
b2c2 [media] b2c2: don't break long lines 2016-10-21 09:38:31 -02:00
cpia2 [media] media drivers: annotate fall-through 2017-05-19 07:10:03 -03:00
cx231xx [media] rc-core: cx231xx - leave the internals of rc_dev alone 2017-06-06 09:09:34 -03:00
dvb-usb media: dib0700: fix error handling in dib0700_i2c_xfer_legacy() 2017-06-24 15:41:57 -03:00
dvb-usb-v2 media: dvb-usb-v2: lmedm04: remove unnecessary variable in lme2510_stream_restart() 2017-06-24 18:46:05 -03:00
em28xx media: Replace initalized ->initialized 2017-06-24 15:46:24 -03:00
go7007 [media] go7007: improve subscribe event handling 2017-03-22 10:12:21 -03:00
gspca [media] m5602_s5k83a: check return value of kthread_create 2017-06-06 07:28:36 -03:00
hackrf [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
hdpvr [media] hdpvr: fix interrupted recording 2016-11-16 13:30:30 -02:00
msi2500 [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
pulse8-cec media: pulse8-cec/rainshadow-cec: make adapter name unique 2017-07-18 13:00:52 -03:00
pvrusb2 [media] pvrusb2: remove redundant check on cnt > 8 2017-06-07 13:52:41 -03:00
pwc [media] media drivers: annotate fall-through 2017-05-19 07:10:03 -03:00
rainshadow-cec media: pulse8-cec/rainshadow-cec: make adapter name unique 2017-07-18 13:00:52 -03:00
s2255 [media] s2255drv: avoid a switch fall through 2017-05-19 09:05:19 -03:00
siano [media] siano: make it work again with CONFIG_VMAP_STACK 2017-02-14 18:13:49 -02:00
stk1160 [media] media: stk1160: Add Kconfig help on snd-usb-audio requirement 2017-04-18 12:15:45 -03:00
stkwebcam media: stkwebcam: Use more common logging styles 2017-06-24 09:36:38 -03:00
tm6000 [media] tm6000: key_addr is unused 2017-06-06 09:10:11 -03:00
ttusb-budget [media] ttusb-budget: don't break long lines 2016-10-21 09:54:20 -02:00
ttusb-dec [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
usbtv [media] usbtv: add sharpness control 2017-02-08 11:57:24 -02:00
usbvision media: usbvision-i2c: fix format overflow warning 2017-07-20 06:58:28 -04:00
uvc [media] uvcvideo: Add iFunction or iInterface to device names 2017-06-06 07:33:26 -03:00
zr364xx [media] zr364xx: enforce minimum size when reading header 2017-04-18 12:57:29 -03:00
Kconfig [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00
Makefile [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00