Fix some compiler warnings

This commit is contained in:
Blaz Kristan 2024-08-18 10:45:16 +02:00
parent 27bec89386
commit f6c47ac19c
2 changed files with 7 additions and 7 deletions

View File

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

View File

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