Skip to content

Commit 58606c5

Browse files
authored
Fix -Wunused-parameter warnings (#328)
1 parent c40424a commit 58606c5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Adafruit_GFX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,7 @@ void Adafruit_GFX::getTextBounds(const __FlashStringHelper *str, int16_t x,
15391539
/**************************************************************************/
15401540
void Adafruit_GFX::invertDisplay(bool i) {
15411541
// Do nothing, must be subclassed if supported by hardware
1542+
(void)i; // disable -Wunused-parameter warning
15421543
}
15431544

15441545
/***************************************************************************/

Adafruit_SPITFT.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,6 +1984,7 @@ uint16_t Adafruit_SPITFT::readcommand16(uint16_t addr) {
19841984
}
19851985
return result;
19861986
#else
1987+
(void)addr; // disable -Wunused-parameter warning
19871988
return 0;
19881989
#endif // end !USE_FAST_PINIO
19891990
}
@@ -2171,6 +2172,8 @@ void Adafruit_SPITFT::write16(uint16_t w) {
21712172
#if defined(USE_FAST_PINIO)
21722173
if (tft8.wide)
21732174
*(volatile uint16_t *)tft8.writePort = w;
2175+
#else
2176+
(void)w; // disable -Wunused-parameter warning
21742177
#endif
21752178
TFT_WR_STROBE();
21762179
}

0 commit comments

Comments
 (0)