summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>2016-11-26 17:43:50 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-02-03 07:20:19 -0200
commit92fbeb40b132f5b2ec335f644ba563a1a85ffd8b (patch)
tree6b57f072a4d564065c1387f70fcff14d6e285512 /drivers/media
parent062c5fff31be2e5324067859ef24a748f59ca029 (diff)
downloadlinux-92fbeb40b132f5b2ec335f644ba563a1a85ffd8b.tar.bz2
[media] tw686x: silent -Wformat-security warning
Using sprintf() with a non-literal string makes some compiler complain when building with -Wformat-security (eg. clang reports "format string is not a string literal (potentially insecure)"). Here sprintf() format parameter is indirectly a literal string so there is no security issue. Nevertheless adding a "%s" format string to silent the warning helps to detect real bugs in the kernel. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/tw686x/tw686x-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw686x/tw686x-core.c
index 71a0453b1af1..336e2f9bc1b6 100644
--- a/drivers/media/pci/tw686x/tw686x-core.c
+++ b/drivers/media/pci/tw686x/tw686x-core.c
@@ -74,7 +74,7 @@ static const char *dma_mode_name(unsigned int mode)
static int tw686x_dma_mode_get(char *buffer, struct kernel_param *kp)
{
- return sprintf(buffer, dma_mode_name(dma_mode));
+ return sprintf(buffer, "%s", dma_mode_name(dma_mode));
}
static int tw686x_dma_mode_set(const char *val, struct kernel_param *kp)