Fix Tracerouter warnings (#7637)

* Static cast to avoid signed comparison

* Another one
This commit is contained in:
Ben Meadors 2025-08-15 07:03:14 -05:00 committed by GitHub
parent 062168cd42
commit c8694f9f2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;