Fix several warnings in code and libs

This commit is contained in:
Luc
2020-11-30 13:46:50 +01:00
parent 217b5062b4
commit fa863105fe
12 changed files with 176 additions and 154 deletions

View File

@@ -1817,7 +1817,7 @@ bool COMMAND::execute_command (int cmd, String cmd_params, tpipe output, level_a
String cmd_part1 = currentline.substring (ESPpos + 4, ESPpos2);
String cmd_part2 = "";
//is there space for parameters?
if (ESPpos2 < currentline.length() ) {
if ((uint)ESPpos2 < currentline.length() ) {
cmd_part2 = currentline.substring (ESPpos2 + 1);
}
//if command is a valid number then execute command
@@ -2067,7 +2067,7 @@ bool COMMAND::check_command (String buffer, tpipe output, bool handlelockserial,
String cmd_part1 = buffer.substring (ESPpos + 4, ESPpos2);
String cmd_part2 = "";
//is there space for parameters?
if (ESPpos2 < buffer.length() ) {
if ((uint)ESPpos2 < buffer.length() ) {
cmd_part2 = buffer.substring (ESPpos2 + 1);
}
//if command is a valid number then execute command
@@ -2086,7 +2086,7 @@ bool COMMAND::check_command (String buffer, tpipe output, bool handlelockserial,
//read a buffer in an array
void COMMAND::read_buffer_serial (uint8_t *b, size_t len)
{
for (long i = 0; i < len; i++) {
for (size_t i = 0; i < len; i++) {
read_buffer_serial (b[i]);
//*b++;
}