mirror of
https://github.com/apache/nuttx.git
synced 2026-09-21 21:47:28 +08:00
greenhills: fix enumerated type mixed with another type warning
"net/netdev_upperhalf.c", line 133: warning #188-D: enumerated type mixed with
another type
total += netdev_lower_quota_load(lower, type);
CC: dirent/lib_alphasort.c "spi/spi_transfer.c", line 83: warning #188-D: enumerated type mixed with
another type
SPI_SETMODE(spi, seq->mode);
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -102,9 +102,9 @@ struct netdev_upperhalf_s
|
||||
static bool quota_is_valid(FAR struct netdev_lowerhalf_s *lower)
|
||||
{
|
||||
int total = 0;
|
||||
int type;
|
||||
enum netpkt_type_e type;
|
||||
|
||||
for (type = 0; type < NETPKT_TYPENUM; type++)
|
||||
for (type = NETPKT_TX; type < NETPKT_TYPENUM; type++)
|
||||
{
|
||||
total += netdev_lower_quota_load(lower, type);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq)
|
||||
}
|
||||
#endif
|
||||
|
||||
SPI_SETMODE(spi, seq->mode);
|
||||
SPI_SETMODE(spi, (enum spi_mode_e)seq->mode);
|
||||
SPI_SETBITS(spi, seq->nbits);
|
||||
|
||||
/* Select the SPI device in preparation for the transfer.
|
||||
|
||||
Reference in New Issue
Block a user