mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
usb: dwc2: add printf attribute to cat_printf()
As cat_printf() uses printf format strings in its parameters, adding __printf attribute allows the compiler to detect at compile-time some errors related to format strings (with -Wformat warning flag). Signed-off-by: Nicolas Iooss <[email protected]> Acked-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
0d7995031a
commit
e135ab7405
1 changed files with 2 additions and 1 deletions
|
|
@ -367,7 +367,8 @@ static void pmap_unschedule(unsigned long *map, int bits_per_period,
|
|||
* @fmt: The format for printf.
|
||||
* @...: The args for printf.
|
||||
*/
|
||||
static void cat_printf(char **buf, size_t *size, const char *fmt, ...)
|
||||
static __printf(3, 4)
|
||||
void cat_printf(char **buf, size_t *size, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int i;
|
||||
|
|
|
|||
Loading…
Reference in a new issue