mirror of https://gitee.com/openkylin/linux.git
8e8673a227
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:
|
||
---|---|---|
.. | ||
b53 | ||
microchip | ||
mv88e6xxx | ||
sja1105 | ||
Kconfig | ||
Makefile | ||
bcm_sf2.c | ||
bcm_sf2.h | ||
bcm_sf2_cfp.c | ||
bcm_sf2_regs.h | ||
dsa_loop.c | ||
dsa_loop.h | ||
dsa_loop_bdinfo.c | ||
lan9303-core.c | ||
lan9303.h | ||
lan9303_i2c.c | ||
lan9303_mdio.c | ||
lantiq_gswip.c | ||
lantiq_pce.h | ||
mt7530.c | ||
mt7530.h | ||
mv88e6060.c | ||
mv88e6060.h | ||
qca8k.c | ||
qca8k.h | ||
realtek-smi.c | ||
realtek-smi.h | ||
rtl8366.c | ||
rtl8366rb.c | ||
vitesse-vsc73xx.c |