Quiesce a couple pages of clang warnings with a cast. Duplicates

linux maintainer commit:

627871b71c (diff-8c6ddb4c3ad69a6fb9f289475821db56)

ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
  to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
  [-Wconstant-conversion]
            /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
                                              ^~~~~~~~~~~~~~~~~~
ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
    (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15476
This commit is contained in:
sbruno 2018-05-18 17:23:23 +00:00
parent 07b7de622b
commit 4149673036

View File

@ -139,7 +139,7 @@ enum Ar9300EepromTemplate
#define OSPREY_CUSTOMER_DATA_SIZE 20
#define FREQ2FBIN(x,y) \
(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
(u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
#define FBIN2FREQ(x,y) \
(((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
#define OSPREY_MAX_CHAINS 3