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.
This commit is contained in:
parent
0cb3e4af30
commit
073292315f
|
@ -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
|
* - 40mhz we can base the selection off the channel flags, either
|
||||||
* higher or lower.
|
* higher or lower.
|
||||||
*/
|
*/
|
||||||
|
_Pragma("GCC diagnostic push")
|
||||||
|
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
|
||||||
switch (width) {
|
switch (width) {
|
||||||
|
_Pragma("GCC diagnostic pop")
|
||||||
case BAND_CHANDEF_WIDTH_20:
|
case BAND_CHANDEF_WIDTH_20:
|
||||||
return 0;
|
return 0;
|
||||||
case BAND_CHANDEF_WIDTH_40:
|
case BAND_CHANDEF_WIDTH_40:
|
||||||
|
|
Loading…
Reference in New Issue