commit 073292315f42e76d7a19f9e33afc9d28cbd50136
parent 0cb3e4af30d360fee2f041411f89591d68c6e4d5
Author: Denis Kenzior <denkenz@gmail.com>
Date: Fri, 6 Oct 2023 23:21:48 -0500
band: Silence warning
width must be initialized since it depends on best not being NULL. If
best passes the non-NULL check above, then width must be initialized
since both width and best are set at the same time.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/band.c b/src/band.c
@@ -1260,7 +1260,10 @@ int band_freq_to_ht_chandef(uint32_t freq, const struct band_freq_attrs *attr,
* - 40mhz we can base the selection off the channel flags, either
* higher or lower.
*/
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
switch (width) {
+_Pragma("GCC diagnostic pop")
case BAND_CHANDEF_WIDTH_20:
return 0;
case BAND_CHANDEF_WIDTH_40: