m5stack / M5StickC

M5StickC Arduino Library
MIT License
477 stars 222 forks source link

Fix compile warning #40

Closed tanakamasayuki closed 5 years ago

tanakamasayuki commented 5 years ago
\Arduino\libraries\M5StickC\src\AXP192.cpp: In member function 'uint8_t AXP192::GetWarningLeve()':
\Arduino\libraries\M5StickC\src\AXP192.cpp:466:14: warning: unused variable 'vaps' [-Wunused-variable]
     uint16_t vaps = 0;
              ^

\Arduino\libraries\M5StickC\src\M5Display.cpp: In member function 'bool M5Display::initHzk16(boolean, const char*, const char*)':
\Arduino\libraries\M5StickC\src\M5Display.cpp:87:8: warning: unused variable 'result' [-Wunused-variable]
   bool result = false;
        ^

->unused variable

\Arduino\libraries\M5StickC\src\utility\qrcode.c: In function 'qrcode_getModule':
\Arduino\libraries\M5StickC\src\utility\qrcode.c:856:11: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     if (x < 0 || x >= qrcode->size || y < 0 || y >= qrcode->size) {
           ^

\Arduino\libraries\M5StickC\src\utility\qrcode.c:856:41: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     if (x < 0 || x >= qrcode->size || y < 0 || y >= qrcode->size) {
                                         ^

-> x and y is uint8_t. Always positive.