forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
062c5fff31
commit
92fbeb40b1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user