Skip to content

Commit cd52edd

Browse files
extinguishxiaoxiang781216
authored andcommitted
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>
1 parent 1174d22 commit cd52edd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/netdev_upperhalf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ struct netdev_upperhalf_s
102102
static bool quota_is_valid(FAR struct netdev_lowerhalf_s *lower)
103103
{
104104
int total = 0;
105-
int type;
105+
enum netpkt_type_e type;
106106

107-
for (type = 0; type < NETPKT_TYPENUM; type++)
107+
for (type = NETPKT_TX; type < NETPKT_TYPENUM; type++)
108108
{
109109
total += netdev_lower_quota_load(lower, type);
110110
}

drivers/spi/spi_transfer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq)
8080
}
8181
#endif
8282

83-
SPI_SETMODE(spi, seq->mode);
83+
SPI_SETMODE(spi, (enum spi_mode_e)seq->mode);
8484
SPI_SETBITS(spi, seq->nbits);
8585

8686
/* Select the SPI device in preparation for the transfer.

0 commit comments

Comments
 (0)