Dmitry Antipov <dmantipov@xxxxxxxxx> writes: > When compiling with gcc version 14.0.1 20240226 (experimental) and > W=12, I've noticed the following warnings: > > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_op_remain_on_channel': > drivers/net/wireless/ath/ath11k/mac.c:9230:12: warning: 'ret' may be used uninitialized > [-Wmaybe-uninitialized] > 9230 | if (ret) > > drivers/net/wireless/ath/ath11k/qmi.c: In function 'ath11k_qmi_load_file_target_mem': > drivers/net/wireless/ath/ath11k/qmi.c:2401:16: warning: 'ret' may be used uninitialized > [-Wmaybe-uninitialized] > 2401 | return ret; > > drivers/net/wireless/ath/ath11k/qmi.c: In function 'ath11k_qmi_load_bdf_qmi': > drivers/net/wireless/ath/ath11k/qmi.c:2494:17: warning: 'fw_entry' may be used uninitialized > [-Wmaybe-uninitialized] > 2494 | release_firmware(fw_entry); > > And a bunch of them traced to uninitialized fields of the same > variable, e.g.: > > drivers/net/wireless/ath/ath11k/spectral.c: In function 'ath11k_spectral_process_data': > drivers/net/wireless/ath/ath11k/spectral.c:700:47: warning: 'summ_rpt.meta.freq1' may > be used uninitialized [-Wmaybe-uninitialized] > 700 | struct ath11k_spectral_summary_report summ_rpt; > > Fix all of the above by using 0 and NULL initializers where appropriate. > Note there are few more (less obvious) -Wmaybe-uninitialized warnings > still remains, but they're hardly possible to fix without running on > a physical hardware. Compile tested oly. > > Also noticed by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx> Did you verify that the warnings are valid? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches