瀏覽代碼

qcacmn: Fix compiler warning on shift overflow in QCA vendor definitions

Fx 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.

Change-Id: I27daebd07d0cbf314459254cfc5906f5e56dd4be
CRs-Fixed: 3299457
Chaoli Zhou 2 年之前
父節點
當前提交
400309d015
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      os_if/linux/qca_vendor.h

+ 1 - 1
os_if/linux/qca_vendor.h

@@ -3827,7 +3827,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,
 };
 
 /**