Skip to content

Commit 59dcd3f

Browse files
committed
Fix signed/unsigned comparison warning in SerialBase.cpp
Silence the following compiler warning: Compile: SerialBase.cpp [Warning] SerialBase.cpp@34,23: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tony Wu <[email protected]>
1 parent c19dd19 commit 59dcd3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hal/common/SerialBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SerialBase::SerialBase(PinName tx, PinName rx) :
3131
_serial(), _baud(9600) {
3232
// No lock needed in the constructor
3333

34-
for (int i = 0; i < sizeof _irq / sizeof _irq[0]; i++) {
34+
for (size_t i = 0; i < sizeof _irq / sizeof _irq[0]; i++) {
3535
_irq[i].attach(donothing);
3636
}
3737

0 commit comments

Comments
 (0)