From 512b15c7462655d500dabe4b8ef1dde3ee78dc18 Mon Sep 17 00:00:00 2001 From: Luke Switzer Date: Thu, 17 Aug 2023 16:16:11 -0600 Subject: [PATCH] fix explicit string casting #4 warning: ISO C++ forbids converting a string constant to 'char*' --- src/Demo/Scan.h | 12 ++++++------ src/Demo/Screen.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Demo/Scan.h b/src/Demo/Scan.h index 531c772..6d813cb 100644 --- a/src/Demo/Scan.h +++ b/src/Demo/Scan.h @@ -313,19 +313,19 @@ void makeDNSRequest() { // /* ----------------- Make DNS Request to URL ------------------ */ // /* --------------------------------------------------------------*/ -char *getEncryption(uint8_t network) { +const char* getEncryption(uint8_t network) { byte encryption = WiFi.encryptionType(network); switch (encryption) { case 5: - return "WEP"; // WEP + return "WEP"; case 2: - return "WPA"; // WPA + return "WPA"; case 4: - return "WPA2"; // WPA2 + return "WPA2"; case 7: - return "NONE"; // NONE + return "NONE"; case 8: - return "AUTO"; // AUTO + return "AUTO"; } return "AUTO"; // AUTO / fail case } diff --git a/src/Demo/Screen.h b/src/Demo/Screen.h index f6c5f9a..1e79152 100644 --- a/src/Demo/Screen.h +++ b/src/Demo/Screen.h @@ -10,7 +10,7 @@ static uint8_t initScreen(uint8_t SCL, uint8_t SDA, uint8_t addr) { return 0; } -void drawMockup(char* gpscoords, char* time, uint8_t sats, uint8_t nets, uint8_t reqs, uint8_t open, char* message) { +void drawMockup(const char* gpscoords, const char* time, uint8_t sats, uint8_t nets, uint8_t reqs, uint8_t open, const char* message) { display.clear(); display.drawLine(0,12,127,12); display.drawLine(0,49,127,49);