../../../../dev/ic/ar5211.c:2592:11: error: comparison of unsigned expression < 
0 is always false [-Werror,-Wtautological-compare]
        if (obdb < 0)
            ~~~~ ^ ~

obdb is expected to be able to be set to a value of -1 but its using
an unsigned type at the moment. This changes the field to an int to
match ar5k_ar5111_rfregs / ar5k_ar5112_rfregs and fix the bug pointed
out by this clang warning.


Index: ar5211.c
===================================================================
RCS file: /home/cvs/src/sys/dev/ic/ar5211.c,v
retrieving revision 1.44
diff -u -p -r1.44 ar5211.c
--- ar5211.c    2 Jun 2009 12:39:02 -0000       1.44
+++ ar5211.c    29 Aug 2012 18:39:23 -0000
@@ -2563,8 +2563,9 @@ ar5k_ar5211_rfregs(struct ath_hal *hal, 
 {
        struct ar5k_eeprom_info *ee = &hal->ah_capabilities.cap_eeprom;
        struct ar5k_ar5211_ini_rf rf[nitems(ar5211_rf)];
-       u_int32_t ob, db, obdb, xpds, xpdp, x_gain;
+       u_int32_t ob, db, xpds, xpdp, x_gain;
        u_int i;
+       int obdb;
 
        bcopy(ar5211_rf, rf, sizeof(rf));
        obdb = 0;

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to