Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 compiler warnings that are likely bugs #41

Open
marcmerlin opened this issue May 12, 2019 · 0 comments
Open

2 compiler warnings that are likely bugs #41

marcmerlin opened this issue May 12, 2019 · 0 comments

Comments

@marcmerlin
Copy link

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);
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant