From 1cf4c02039c123cc0f16b82ae7e65aac75bc78e5 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 15 Nov 2023 18:22:28 +0000 Subject: [PATCH] fix warnings --- flash_filer.cpp | 4 +++- pia.h | 6 +++--- ps2drv.cpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/flash_filer.cpp b/flash_filer.cpp index f4fdbd2..877291c 100644 --- a/flash_filer.cpp +++ b/flash_filer.cpp @@ -84,7 +84,6 @@ void flash_filer::stop() const char *flash_filer::advance() { #if defined(USE_SPIFFS) || defined(USE_LITTLEFS) - bool rewound = false; files[_current].close(); #if defined(USE_LITTLEFS) static char buf[32]; @@ -98,6 +97,7 @@ const char *flash_filer::advance() { strncpy(buf, dir.fileName().c_str(), sizeof(buf)); return buf; #else + bool rewound = false; while (true) { files[_current] = dir.openNextFile(); if (files[_current]) { @@ -126,9 +126,11 @@ const char *flash_filer::rewind() { } #if !defined(NO_CHECKPOINT) +#if defined(USE_SPIFFS) static char buf[32]; static char chkpt[] = { "CHKPOINT" }; static int cpid = 0; +#endif const char *flash_filer::checkpoint() { #if defined(USE_SPIFFS) diff --git a/pia.h b/pia.h index 4b13a0d..78f3e77 100644 --- a/pia.h +++ b/pia.h @@ -5,9 +5,9 @@ // https://en.wikipedia.org/wiki/Peripheral_Interface_Adapter class PIA { public: - PIA(): outb(0), inb(0), crb(0), outa(0), ina(0), cra(0), ddrb(0), ddra(0), - ca1(false), ca2(false), cb1(false), cb2(false), - irq_a1(false), irq_a2(false), irq_b1(false), irq_b2(false) {} + PIA(): cra(0), ina(0), outa(0), ddra(0), crb(0), inb(0), outb(0), ddrb(0), + ca1(false), ca2(false), irq_a1(false), irq_a2(false), + cb1(false), cb2(false), irq_b1(false), irq_b2(false) {} virtual void reset() { outb = inb = crb = ddrb = outa = ina = cra = ddra = 0; diff --git a/ps2drv.cpp b/ps2drv.cpp index 17a74d3..8539615 100644 --- a/ps2drv.cpp +++ b/ps2drv.cpp @@ -11,7 +11,7 @@ static uint8_t DataPin; // The ISR for the external interrupt #if defined(ESP32) || defined(ESP8266) -ICACHE_RAM_ATTR +IRAM_ATTR #endif void ps2interrupt(void) {