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]
Date:   Sat, 15 Sep 2018 17:44:25 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Nathan Chancellor <natechancellor@...il.com>,
        Jean Delvare <jdelvare@...e.com>
Cc:     linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] hwmon: scmi: Remove redundant pointer check

On 09/15/2018 05:05 PM, Nathan Chancellor wrote:
> Clang warns when the address of a pointer is used in a boolean context
> as it will always return true.
> 
> drivers/hwmon/scmi-hwmon.c:59:24: warning: address of array
> 'sensor->name' will always evaluate to 'true'
> [-Wpointer-bool-conversion]
>          if (sensor && sensor->name)
>                     ~~ ~~~~~~~~^~~~
> 1 warning generated.
> 
> Remove the check as it isn't doing anything currently; if validation
> of the contents of the data structure was intended by the original
> author (since this line has been present from the first version of
> this driver), it can be added in a follow-up patch.
> 
> Reported-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Applied to hwmon-next.

Thanks,
Guenter

Powered by blists - more mailing lists