Skip to content

Commit 23ba821

Browse files
authored
Merge pull request #157 from liebman/cleanup-warnings
cleanup compiler warnings
2 parents aaa38d8 + 2e48df9 commit 23ba821

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

OLEDDisplay.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ void inline OLEDDisplay::drawInternal(int16_t xMove, int16_t yMove, int16_t widt
762762
int16_t xPos = xMove + (i / rasterHeight);
763763
int16_t yPos = ((yMove >> 3) + (i % rasterHeight)) * displayWidth;
764764

765-
int16_t yScreenPos = yMove + yOffset;
766765
int16_t dataPos = xPos + yPos;
767766

768767
if (dataPos >= 0 && dataPos < displayBufferSize &&

OLEDDisplay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ class OLEDDisplay : public Print {
273273
char *logBuffer = NULL;
274274

275275
// Send a command to the display (low level function)
276-
virtual void sendCommand(uint8_t com) {};
276+
virtual void sendCommand(uint8_t com) {(void)com;};
277277

278278
// Connect to the display
279-
virtual bool connect() {return true;};
279+
virtual bool connect() {return false;};
280280

281281
// Send all the init commands
282282
void sendInitCommands();

OLEDDisplayUi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void OLEDDisplayUi::drawFrame(){
251251
switch (this->state.frameState){
252252
case IN_TRANSITION: {
253253
float progress = (float) this->state.ticksSinceLastStateSwitch / (float) this->ticksPerTransition;
254-
int16_t x, y, x1, y1;
254+
int16_t x = 0, y = 0, x1 = 0, y1 = 0;
255255
switch(this->frameAnimationDirection){
256256
case SLIDE_LEFT:
257257
x = -(this->display->getWidth()) * progress;
@@ -332,7 +332,7 @@ void OLEDDisplayUi::drawIndicator() {
332332
return;
333333
}
334334

335-
uint8_t posOfHighlightFrame;
335+
uint8_t posOfHighlightFrame = 0;
336336
float indicatorFadeProgress = 0;
337337

338338
// if the indicator needs to be slided in we want to
@@ -372,6 +372,7 @@ void OLEDDisplayUi::drawIndicator() {
372372
const uint8_t *image;
373373

374374
uint16_t x,y;
375+
375376
for (byte i = 0; i < this->frameCount; i++) {
376377

377378
switch (this->indicatorPosition){

SSD1306Wire.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class SSD1306Wire : public OLEDDisplay {
9191
// If the minBoundY wasn't updated
9292
// we can savely assume that buffer_back[pos] == buffer[pos]
9393
// holdes true for all values of pos
94-
if (minBoundY == ~0) return;
94+
if (minBoundY == (uint8_t)(~0)) return;
9595

9696
sendCommand(COLUMNADDR);
9797
sendCommand(minBoundX);

0 commit comments

Comments
 (0)