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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 Jul 2022 21:35:27 +0000
From:   Chaitanya Kulkarni <chaitanyak@...dia.com>
To:     Justin Stitt <justinstitt@...gle.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        Max Gurtovoy <mgurtovoy@...dia.com>,
        "michael.christie@...cle.com" <michael.christie@...cle.com>,
        "mingzhe.zou@...ystack.cn" <mingzhe.zou@...ystack.cn>,
        "nathan@...nel.org" <nathan@...nel.org>,
        "ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
        "target-devel@...r.kernel.org" <target-devel@...r.kernel.org>,
        "trix@...hat.com" <trix@...hat.com>
Subject: Re: [PATCH v2] target: iscsi: fix clang -Wformat warnings

On 7/18/22 11:04, Justin Stitt wrote:
> When building with Clang we encounter these warnings:
> | drivers/target/iscsi/iscsi_target_login.c:719:24: error: format
> | specifies type 'unsigned short' but the argument has type 'int'
> | [-Werror,-Wformat] " from node: %s\n", atomic_read(&sess->nconn),
> -
> | drivers/target/iscsi/iscsi_target_login.c:767:12: error: format
> | specifies type 'unsigned short' but the argument has type 'int'
> | [-Werror,-Wformat] " %s\n", atomic_read(&sess->nconn),
> -
> | drivers/target/iscsi/iscsi_target.c:4365:12: error: format specifies
> | type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
> | " %s\n", atomic_read(&sess->nconn)
> 
> For all warnings, the format specifier is `%hu` which describes an
> unsigned short. The resulting type of atomic_read is an int. The
> proposed fix is to listen to Clang and swap the format specifier.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/378
> Signed-off-by: Justin Stitt <justinstitt@...gle.com>

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@...dia.com>

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ