From f6c47ac19cd9fc2b6b2861289b86f2ef963a329a Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 18 Aug 2024 10:45:16 +0200 Subject: [PATCH] Fix some compiler warnings --- wled00/FX_2Dfcn.cpp | 10 +++++----- wled00/FX_fcn.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index 0fd5bb09f..44919f925 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -185,14 +185,14 @@ void IRAM_ATTR Segment::setPixelColorXY(int x, int y, uint32_t col) x *= groupLength(); // expand to physical pixels y *= groupLength(); // expand to physical pixels - unsigned W = width(); - unsigned H = height(); + int W = width(); + int H = height(); if (x >= W || y >= H) return; // if pixel would fall out of segment just exit uint32_t tmpCol = col; - for (unsigned j = 0; j < grouping; j++) { // groupping vertically - for (unsigned g = 0; g < grouping; g++) { // groupping horizontally - unsigned xX = (x+g), yY = (y+j); + for (int j = 0; j < grouping; j++) { // groupping vertically + for (int g = 0; g < grouping; g++) { // groupping horizontally + int xX = (x+g), yY = (y+j); if (xX >= W || yY >= H) continue; // we have reached one dimension's end #ifndef WLED_DISABLE_MODE_BLEND diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index c6c0dad4d..bc5c8b051 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -905,8 +905,8 @@ uint32_t IRAM_ATTR Segment::getPixelColor(int i) const #ifndef WLED_DISABLE_2D if (is2D()) { - unsigned vH = virtualHeight(); // segment height in logical pixels - unsigned vW = virtualWidth(); + int vH = virtualHeight(); // segment height in logical pixels + int vW = virtualWidth(); switch (map1D2D) { case M12_Pixels: return getPixelColorXY(i % vW, i / vW);