浏览代码

wext: explicitly cast -110 to u8

This doesn't generate any different code, but will
suppress a spurious smatch warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 12 年之前
父节点
当前提交
e7d83ed8d0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/wireless/wext-compat.c

+ 1 - 1
net/wireless/wext-compat.c

@@ -176,7 +176,7 @@ int cfg80211_wext_giwrange(struct net_device *dev,
 	case CFG80211_SIGNAL_TYPE_NONE:
 	case CFG80211_SIGNAL_TYPE_NONE:
 		break;
 		break;
 	case CFG80211_SIGNAL_TYPE_MBM:
 	case CFG80211_SIGNAL_TYPE_MBM:
-		range->max_qual.level = -110;
+		range->max_qual.level = (u8)-110;
 		range->max_qual.qual = 70;
 		range->max_qual.qual = 70;
 		range->avg_qual.qual = 35;
 		range->avg_qual.qual = 35;
 		range->max_qual.updated |= IW_QUAL_DBM;
 		range->max_qual.updated |= IW_QUAL_DBM;