lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8db5f04a-2d16-854b-9a90-001dc286e18b@synopsys.com>
Date:	Mon, 27 Jun 2016 18:59:08 -0700
From:	John Youn <John.Youn@...opsys.com>
To:	Nicolas Iooss <nicolas.iooss_linux@....org>,
	John Youn <John.Youn@...opsys.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...nel.org>
CC:	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] usb: dwc2: add printf attribute to cat_printf()

On 6/26/2016 1:12 AM, Nicolas Iooss wrote:
> 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 <nicolas.iooss_linux@....org>
> ---
>  drivers/usb/dwc2/hcd_queue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c
> index b5c7793a2df2..13754353251f 100644
> --- a/drivers/usb/dwc2/hcd_queue.c
> +++ b/drivers/usb/dwc2/hcd_queue.c
> @@ -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;
> 

Acked-by: John Youn <johnyoun@...opsys.com>

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ