Skip to content

2 compiler warnings that are likely bugs #41

Description

@marcmerlin

Also in marcmerlin/FastLED_NeoMatrix_SmartMatrix_LEDMatrix_GFX_Demos@2723660
The first one seems like an obvious bug.
Second one, seems like a likely bug, but it's not fully clear. @jasoncoon can you have a quick look?

--- a/GFX/Aurora/Effects.h
+++ b/GFX/Aurora/Effects.h
@@ -701,7 +701,7 @@ public:
   }
 
   CRGB ColorFromCurrentPalette(uint8_t index = 0, uint8_t brightness = 255, TBlendType blendType = LINEARBLEND) {
-    return ColorFromPalette(currentPalette, index, brightness, currentBlendType);
+    return ColorFromPalette(currentPalette, index, brightness, blendType);
   }
 
   CRGB HsvToRgb(uint8_t h, uint8_t s, uint8_t v) {
diff --git a/GFX/Aurora/Vector.h b/GFX/Aurora/Vector.h
index 8acbadc..0911313 100644
--- a/GFX/Aurora/Vector.h
+++ b/GFX/Aurora/Vector.h
@@ -45,8 +45,10 @@ public:
     bool operator==(Vector2& v) {
         return x == v.x && y == v.y;
     }
-
     bool operator!=(Vector2& v) {
+       // squelch compiler warning for likely buggy code below
+       v.x = v.x;
+       // this looks buggy
         return !(x == y);
     }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions