From 4f596c75fac2feacd9a34be4c360092678497414 Mon Sep 17 00:00:00 2001 From: Lutz Date: Tue, 30 Apr 2024 07:51:31 -0700 Subject: [PATCH] Ignored some strict compiler warnings in this module --- src/OLEDDisplay.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OLEDDisplay.cpp b/src/OLEDDisplay.cpp index 63e96e5..b7abbb6 100644 --- a/src/OLEDDisplay.cpp +++ b/src/OLEDDisplay.cpp @@ -36,6 +36,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wuseless-cast" +#pragma GCC diagnostic ignored "-Wsign-compare" #include "OLEDDisplay.h" @@ -580,8 +581,8 @@ uint16_t OLEDDisplay::drawStringInternal(int16_t xMove, int16_t yMove, const cha } // Don't draw anything if it is not on the screen. - if (xMove + textWidth < 0 || xMove >= this->width() ) {return 0;} - if (yMove + textHeight < 0 || yMove >= this->height()) {return 0;} + if ((xMove + (int16_t)textWidth) < 0 || xMove >= this->width() ) {return 0;} + if ((yMove + textHeight) < 0 || yMove >= this->height()) {return 0;} for (uint16_t j = 0; j < textLength; j++) { int16_t xPos = xMove + cursorX;