From e8a81142ab16d8b953d891a1a6a3ca8cea605749 Mon Sep 17 00:00:00 2001 From: "Landon J. Fuller" Date: Mon, 12 Feb 2018 22:21:11 +0000 Subject: [PATCH] bwn(4): Fix outstanding bug in PHY-G tssi2dbm table generation caught by -Wconstant-conversion, and remove now unnecessary warning suppression flags. --- sys/conf/files | 10 +++------- sys/dev/bwn/if_bwn_phy_g.c | 2 +- sys/modules/bwn/Makefile | 5 ----- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 251540fdd7c9..1e8aa8e8608c 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1326,15 +1326,11 @@ dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.c optional bwi dev/bwi/if_bwi.c optional bwi dev/bwi/if_bwi_pci.c optional bwi pci -# XXX Work around clang warnings, until maintainer approves fix. -dev/bwn/if_bwn.c optional bwn bhnd \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" +dev/bwn/if_bwn.c optional bwn bhnd dev/bwn/if_bwn_pci.c optional bwn pci bhnd bhndb bhndb_pci dev/bwn/if_bwn_phy_common.c optional bwn bhnd -dev/bwn/if_bwn_phy_g.c optional bwn bhnd \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED} ${NO_WCONSTANT_CONVERSION}" -dev/bwn/if_bwn_phy_lp.c optional bwn bhnd \ - compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" +dev/bwn/if_bwn_phy_g.c optional bwn bhnd +dev/bwn/if_bwn_phy_lp.c optional bwn bhnd dev/bwn/if_bwn_phy_n.c optional bwn bhnd dev/bwn/if_bwn_util.c optional bwn bhnd dev/cardbus/cardbus.c optional cardbus diff --git a/sys/dev/bwn/if_bwn_phy_g.c b/sys/dev/bwn/if_bwn_phy_g.c index 280e52156974..fecb06109282 100644 --- a/sys/dev/bwn/if_bwn_phy_g.c +++ b/sys/dev/bwn/if_bwn_phy_g.c @@ -216,7 +216,7 @@ do { \ } while (delta >= 2); pg->pg_tssi2dbm[i] = MIN(MAX(BWN_TSSI2DBM(m1 * f, 8192), -127), - 128); + 127); } pg->pg_flags |= BWN_PHY_G_FLAG_TSSITABLE_ALLOC; diff --git a/sys/modules/bwn/Makefile b/sys/modules/bwn/Makefile index 2ce6493046b6..4d52cb589ef1 100644 --- a/sys/modules/bwn/Makefile +++ b/sys/modules/bwn/Makefile @@ -38,8 +38,3 @@ SRCS.BWN_GPL_PHY+= if_bwn_phy_n_ppr.c SRCS.BWN_GPL_PHY+= if_bwn_phy_n_core.c .include - -# XXX Work around clang warnings, until maintainer approves fix. -CWARNFLAGS.if_bwn.c= ${NO_WSOMETIMES_UNINITIALIZED} -CWARNFLAGS.if_bwn_phy_g.c= ${NO_WSOMETIMES_UNINITIALIZED} ${NO_WCONSTANT_CONVERSION} -CWARNFLAGS.if_bwn_phy_lp.c= ${NO_WSOMETIMES_UNINITIALIZED}