]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix compiler warning on shift overflow in QCA vendor definitions
authorChaoli Zhou <quic_zchaoli@quicinc.com>
Wed, 21 Sep 2022 08:25:45 +0000 (16:25 +0800)
committerJouni Malinen <j@w1.fi>
Fri, 23 Sep 2022 16:38:07 +0000 (19:38 +0300)
Fix the following compiler error:
qca-vendor.h:5892:54: error: result of β€˜1 << 31’ requires 33 bits to represent, but β€˜int’ only has 32 bits [-Werror=shift-overflow=]
 5892 |  QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,

This "1" needs to be marked unsigned for this case of MSB=1.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
src/common/qca-vendor.h

index 6aa539519255fd5d1c37501be2de94e17ea3913b..fff403d87ddc26a323cd76c1291a2bd796e118e9 100644 (file)
@@ -5889,7 +5889,7 @@ enum qca_wlan_vendor_channel_prop_flags {
        /* HE 40 with extension channel below */
        QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40MINUS     = 1 << 30,
        /* HE 40 intolerant */
-       QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,
+       QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1U << 31,
 };
 
 /**