From fa09bdd7aae4fe78798ae8d3c51e4a884b9bd23d Mon Sep 17 00:00:00 2001 From: Scott Allen Date: Sun, 27 Jul 2014 16:04:21 -0400 Subject: [PATCH] Eliminate compiler warnings - Fixed use of = instead of == in "if" statment. - Fixed uninitialised count variable in "for" loop. - Removed unused variables. - Replaced line splice characters (backslash) at end of comments. --- MicroView.cpp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/MicroView.cpp b/MicroView.cpp index 6a12b4c..6212a58 100644 --- a/MicroView.cpp +++ b/MicroView.cpp @@ -60,18 +60,18 @@ Page buffer is required because in SPI mode, the host cannot read the SSD1306's static uint8_t screenmemory [] = { // LCD Memory organised in 64 horizontal pixel and 6 rows of byte // B B .............B ----- - // y y .............y \ - // t t .............t \ - // e e .............e \ - // 0 1 .............63 \ - // \ - // D0 D0.............D0 \ - // D1 D1.............D1 / ROW 0 - // D2 D2.............D2 / - // D3 D3.............D3 / - // D4 D4.............D4 / - // D5 D5.............D5 / - // D6 D6.............D6 / + // y y .............y | + // t t .............t | + // e e .............e | + // 0 1 .............63 | + // | + // D0 D0.............D0 | ROW 0 + // D1 D1.............D1 | + // D2 D2.............D2 | + // D3 D3.............D3 | + // D4 D4.............D4 | + // D5 D5.............D5 | + // D6 D6.............D6 | // D7 D7.............D7 ---- //SparkFun Electronics LOGO @@ -955,7 +955,7 @@ size_t MicroView::write(uint8_t c) { Serial.println(serCmd[2]); pixel(serCmd[1],serCmd[2]); display(); - } else if (cmdCount=4) { + } else if (cmdCount==4) { Serial.print("pixel "); Serial.print(serCmd[1]); Serial.print(" "); @@ -1269,7 +1269,7 @@ size_t MicroView::write(uint8_t c) { temp=atoi(result); serCmd[index]=(uint8_t)temp & 0xff; // we only need 8 bit number index++; - for (uint8_t i;i