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: <aedd41c1-678e-7975-bf02-be5666dce9af@linutronix.de>
Date:   Tue, 5 Mar 2019 17:21:42 +0100
From:   Test <bornkessel@...utronix.de>
To:     unlisted-recipients:; (no To-header on input)
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com, ndesaulniers@...gle.com,
        jflat@...omium.org
Subject: Re: [PATCH] wusb: use correct format characters

Test

Am 28.02.19 um 12:52 schrieb Louis Taylor:
> When compiling with -Wformat, clang warns:
>
> ./include/linux/usb/wusb.h:245:5: warning: format specifies type
> 'unsigned short' but the argument has type 'u8' (aka 'unsigned char')
> [-Wformat]
>   ckhdid->data[0],  ckhdid->data[1],
>   ^~~~~~~~~~~~~~~
>
> ckhdid->data is unconditionally defined as `u8 data[16]`, so this patch
> updates the format characters to the correct one for unsigned char types.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/378
> Signed-off-by: Louis Taylor <louis@...gniz.eu>
> ---
>  include/linux/usb/wusb.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h
> index 9e4a3213f2c2..0a3cdf10972d 100644
> --- a/include/linux/usb/wusb.h
> +++ b/include/linux/usb/wusb.h
> @@ -240,8 +240,8 @@ static inline size_t ckhdid_printf(char *pr_ckhdid, size_t size,
>  				   const struct wusb_ckhdid *ckhdid)
>  {
>  	return scnprintf(pr_ckhdid, size,
> -			 "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx "
> -			 "%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx",
> +			 "%02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu "
> +			 "%02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu %02hhu",
>  			 ckhdid->data[0],  ckhdid->data[1],
>  			 ckhdid->data[2],  ckhdid->data[3],
>  			 ckhdid->data[4],  ckhdid->data[5],

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ