Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2014-10-02 06:13:34 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-10-02 06:13:34 +0400
commit20c7d9455794e901301feaa2a2e9d978384853ff (patch)
tree73be74e419a62d9cc2e6b7385b55bd060f5b955f
parent1f0a65b39e9b0ad528fe74373ec871bb160f075a (diff)
Clean up warnings
-rw-r--r--lib8tion.h2
-rw-r--r--noise.cpp9
2 files changed, 9 insertions, 2 deletions
diff --git a/lib8tion.h b/lib8tion.h
index 2de3f36f..272d33cc 100644
--- a/lib8tion.h
+++ b/lib8tion.h
@@ -1627,7 +1627,7 @@ LIB8STATIC uint8_t sqrt16(uint16_t x)
do {
mid = (low + hi) >> 1;
- if ((mid * mid) > x) {
+ if ((uint16_t)(mid * mid) > x) {
hi = mid - 1;
} else {
if( mid == 255) {
diff --git a/noise.cpp b/noise.cpp
index 36925c26..163d4663 100644
--- a/noise.cpp
+++ b/noise.cpp
@@ -5,6 +5,14 @@
#define USE_PROGMEM
#endif
+// Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734
+#ifdef FASTLED_AVR
+#ifdef PROGMEM
+#undef PROGMEM
+#define PROGMEM __attribute__((section(".progmem.data")))
+#endif
+#endif
+
#ifdef USE_PROGMEM
#define FL_PROGMEM PROGMEM
#define P(x) pgm_read_byte_near(p + x)
@@ -519,7 +527,6 @@ void fill_raw_2dnoise16(uint16_t *pData, int width, int height, uint8_t octaves,
scalex *= skip;
scaley *= skip;
- uint32_t xx = x;
fract16 invamp = 65535-amplitude;
for(int i = 0; i < height; i+=skip, y+=scaley) {
uint16_t *pRow = pData + (i*width);