Skip to content

Commit 64d982d

Browse files
committedMar 8, 2021
fix: address warnings
1 parent f4418e2 commit 64d982d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎cores/arduino/USB/USBCDC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ const uint8_t *USBCDC::configuration_desc(uint8_t index)
540540
0x02, // bInterfaceClass
541541
0x02, // bInterfaceSubClass
542542
0x01, // bInterfaceProtocol
543-
(extraDescriptor != NULL) ? 0x5 : 0x0, // iInterface
543+
static_cast<uint8_t>((extraDescriptor != NULL) ? 0x5 : 0x0), // iInterface
544544

545545
// CDC Header Functional Descriptor, CDC Spec 5.2.3.1, Table 26
546546
5, // bFunctionLength

‎libraries/Wire/Wire.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ void arduino::MbedI2C::receiveThd() {
138138
rxBuffer.clear();
139139
char buf[16];
140140
while (1) {
141-
int c = slave->read(buf, sizeof(buf));
142-
for (int i = 0; i < c; i++) {
141+
size_t c = slave->read(buf, sizeof(buf));
142+
for (size_t i = 0; i < c; i++) {
143143
rxBuffer.store_char(uint8_t(buf[i]));
144144
}
145145
if (c <= sizeof(buf)) {

0 commit comments

Comments
 (0)