Skip to content

Commit fbc7ec4

Browse files
authored
Merge pull request arduino#149 from GMagician/fix-compile-warnings
Fix compile warnings
2 parents 10ebeba + f937db2 commit fbc7ec4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/arduino/Adafruit_TinyUSB_Core/Adafruit_TinyUSB_Core.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ uint8_t load_serial_number(uint16_t* serial_str)
105105

106106
static const char nibble_to_hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
107107

108-
for (int i = 0; i < sizeof(raw_id); i++) {
108+
for (unsigned int i = 0; i < sizeof(raw_id); i++) {
109109
for (int j = 0; j < 2; j++) {
110110
uint8_t nibble = (raw_id[i] >> (j * 4)) & 0xf;
111111
// Strings are UTF-16-LE encoded.

cores/arduino/pulse.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ uint32_t pulseIn(uint32_t pin, uint32_t state, uint32_t timeout)
4444
volatile uint32_t *port = &(PORT->Group[p.ulPort].IN.reg);
4545
uint32_t usCallStart; // microseconds at start of call, for timeout.
4646
uint32_t usPulseStart; // microseconds at start of measured pulse.
47-
usCallStart = micros();
47+
usCallStart = usPulseStart = micros();
4848
// wait for any previous pulse to end
4949
while ((*port & bit) == stateMask) {
5050
if (micros() - usCallStart > timeout)

0 commit comments

Comments
 (0)