Fixed some compiler warnings

This commit is contained in:
Stefan Kremser
2018-04-05 14:33:49 +02:00
parent 4e8b8a46f4
commit f7e445391e
2 changed files with 15 additions and 10 deletions

View File

@@ -94,14 +94,13 @@ class DisplayUI {
uint32_t drawTime = 0; // last time a frame was drawn
uint32_t startTime = 0; // when the screen was enabled
bool enabled = false; // display enabled
// create buttons with default values
Button buttonUp = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonDown = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonLeft = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonRight = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonA = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonB = {false, 0, false, false, 0, NULL, NULL, NULL};
Button buttonUp;
Button buttonDown;
Button buttonLeft;
Button buttonRight;
Button buttonA;
Button buttonB;
// selected attack modes
bool beaconSelected = false;
@@ -613,4 +612,4 @@ const uint8_t DejaVu_Sans_Mono_12[] PROGMEM = {
};
#endif

View File

@@ -324,6 +324,8 @@ bool progmemToSpiffs(const char* adr, int len, String path) {
f.close();
prntln(SETUP_OK);
return true;
}
bool readFile(String path, String &buf) {
@@ -457,6 +459,8 @@ bool removeLines(String path, int lineFrom, int lineTo){
f2.close();
SPIFFS.remove(path);
SPIFFS.rename(tmpPath, path);
return true;
}
bool replaceLine(String path, int line, String &buf){
@@ -487,6 +491,8 @@ bool replaceLine(String path, int line, String &buf){
f2.close();
SPIFFS.remove(path);
SPIFFS.rename(tmpPath, path);
return true;
}
JsonVariant parseJSONFile(String path, DynamicJsonBuffer &jsonBuffer) {
@@ -587,4 +593,4 @@ String formatBytes(size_t bytes) {
#endif