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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190507.122105.254019469250484569.davem@davemloft.net>
Date:   Tue, 07 May 2019 12:21:05 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     natechancellor@...il.com
Cc:     olteanv@...il.com, andrew@...n.ch, vivien.didelot@...il.com,
        f.fainelli@...il.com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, clang-built-linux@...glegroups.com,
        ndesaulniers@...gle.com
Subject: Re: [PATCH] net: dsa: sja1105: Fix status initialization in
 sja1105_get_ethtool_stats

From: Nathan Chancellor <natechancellor@...il.com>
Date: Mon,  6 May 2019 13:24:47 -0700

> Clang warns:
> 
> drivers/net/dsa/sja1105/sja1105_ethtool.c:316:39: warning: suggest
> braces around initialization of subobject [-Wmissing-braces]
>         struct sja1105_port_status status = {0};
>                                              ^
>                                              {}
> 1 warning generated.
> 
> One way to fix these warnings is to add additional braces like Clang
> suggests; however, there has been a bit of push back from some
> maintainers[1][2], who just prefer memset as it is unambiguous, doesn't
> depend on a particular compiler version[3], and properly initializes all
> subobjects. Do that here so there are no more warnings.
> 
> [1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/
> [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/
> [3]: https://lore.kernel.org/lkml/20181116150432.2408a075@redhat.com/
> 
> Fixes: 52c34e6e125c ("net: dsa: sja1105: Add support for ethtool port counters")
> Link: https://github.com/ClangBuiltLinux/linux/issues/471
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>

Applied to net-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ