Skip to content

Commit c6674ca

Browse files
committed
Fix compiler warning
Signed-off-by: Sara Damiano <[email protected]>
1 parent 333a27c commit c6674ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SensorModbusMaster.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,16 +1170,18 @@ void modbusMaster::printFrameHex(byte* modbusFrame, int frameLength) {
11701170
}
11711171
debugPrint("}\n");
11721172
}
1173-
void modbusMaster::printArraySlice(byte* array, int start_index, int numBytes) {
11741173
#if defined(MODBUSMASTER_DEBUG_SLICE)
1174+
void modbusMaster::printArraySlice(byte* array, int start_index, int numBytes) {
11751175
debugPrint("bytes ", start_index, "-", start_index + numBytes - 1, " [");
11761176
for (int i = start_index; i < start_index + numBytes; i++) {
11771177
printPaddedHex(array[i]);
11781178
if (i < start_index + numBytes - 1) debugPrint(", ");
11791179
}
11801180
debugPrint("]\n");
1181-
#endif
11821181
}
1182+
#else
1183+
void modbusMaster::printArraySlice(byte*, int, int) {}
1184+
#endif
11831185

11841186

11851187
// Calculates a Modbus RTC cyclical redundancy code (CRC)

0 commit comments

Comments
 (0)