mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-18 19:23:19 +00:00
Fix Tracerouter warnings (#7637)
* Static cast to avoid signed comparison * Another one
This commit is contained in:
parent
062168cd42
commit
c8694f9f2d
@ -602,7 +602,7 @@ void TraceRouteModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
int start = 0;
|
int start = 0;
|
||||||
int newlinePos = resultText.indexOf('\n', start);
|
int newlinePos = resultText.indexOf('\n', start);
|
||||||
|
|
||||||
while (newlinePos != -1 || start < resultText.length()) {
|
while (newlinePos != -1 || start < static_cast<int>(resultText.length())) {
|
||||||
String segment;
|
String segment;
|
||||||
if (newlinePos != -1) {
|
if (newlinePos != -1) {
|
||||||
segment = resultText.substring(start, newlinePos);
|
segment = resultText.substring(start, newlinePos);
|
||||||
@ -624,7 +624,7 @@ void TraceRouteModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
int lastGoodBreak = -1;
|
int lastGoodBreak = -1;
|
||||||
bool lineComplete = false;
|
bool lineComplete = false;
|
||||||
|
|
||||||
for (int i = 0; i < remaining.length(); i++) {
|
for (int i = 0; i < static_cast<int>(remaining.length()); i++) {
|
||||||
char ch = remaining.charAt(i);
|
char ch = remaining.charAt(i);
|
||||||
String testLine = tempLine + ch;
|
String testLine = tempLine + ch;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user