ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
2.02k stars 640 forks source link

Last ESP32 compiler make errors in previous warnings #162

Closed jestebanes closed 4 years ago

jestebanes commented 6 years ago

Hello, this issue appears with ESP32 Wemos Oled and the last compiler version

in OLEDDisplay.h line 253, the method must to return a value, I suggest the new line

virtual bool connect() {return false;};

in OLELDisplay.cpp in line 356, variable data must be used uninitialized, I suggest initialize to 0

uint8_t data=0;

in OLEDDisplay.cpp in line 381, enumeration value TEXT_ALIGN_LEFT not used, I suggest to introduce it

case TEXT_ALIGN_LEFT: break;

in OLEDDisplayUi.cpp in line 387, variable posOfhighlightFrame must be used uninitialized, I suggest initialize to 0 in line 334

uint8_t posOfHighlightFrame = 0;

in OLEDDisplayUi.cpp in line 393, variable x, y must be used uninitialized, I suggest initialize to 0 in line 365

uint16_t x=0,y=0;

in OLEDDisplayUi.cpp in line 284, variable x, y, x1, y1 must be used uninitialized, I suggest initialize to 0 in line 254

int16_t x=0, y=0, x1=0, y1=0;

dsptech commented 6 years ago

Hi, same issues here. Applied the suggested fixes (but false on virtual connect to check if the overriding goes wrong) and all work fine.

jestebanes commented 6 years ago

Ok thanks, @dsptech, I change the virtual connect to return false. thanks for the improvement.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.