git: f369f10dd812 - main - LinuxKPI: 802.11: fix a -Wenum-compare warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Apr 2023 21:50:28 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=f369f10dd8122b1cd1282a378fb16ba81a712a74
commit f369f10dd8122b1cd1282a378fb16ba81a712a74
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-04-19 21:40:18 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-04-19 21:49:17 +0000
LinuxKPI: 802.11: fix a -Wenum-compare warning
We are asserting that two values from different enums are the same.
gcc warns about these. Cast the values to (int) to avoid the warning.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
---
sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 36e6600f237b..1fcee420232c 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1784,7 +1784,7 @@ ieee80211_action_contains_tpc(struct sk_buff *skb)
return (false);
/* Check that it is TPC Report or Link Measurement Report? */
- KASSERT(IEEE80211_ACTION_SM_TPCREP == IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP,
+ KASSERT((int)IEEE80211_ACTION_SM_TPCREP == (int)IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP,
("%s: SM_TPCREP %d != RADIO_MEASUREMENT_LMREP %d\n", __func__,
IEEE80211_ACTION_SM_TPCREP, IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP));
if (mgmt->u.action.u.tpc_report.spec_mgmt != IEEE80211_ACTION_SM_TPCREP)