Example sketch does not compile
Posted: Tue Apr 20, 2021 8:13 pm
Sketch is RTClib > ds1307 which does date and time functions using a DS1307 RTC connected via I2C and Wire lib
After compiling, I get:
Arduino: 1.8.12 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp: In constructor 'DateTime::DateTime(const char*, const char*)':
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp:136:70: error: operation on '((DateTime*)this)->DateTime::m' may be undefined [-Werror=sequence-point]
case 'J': m = date[1] == 'a' ? 1 : m = date[2] == 'n' ? 6 : 7; break;
^
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp: In constructor 'DateTime::DateTime(const __FlashStringHelper*, const __FlashStringHelper*)':
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp:161:70: error: operation on '((DateTime*)this)->DateTime::m' may be undefined [-Werror=sequence-point]
case 'J': m = buff[1] == 'a' ? 1 : m = buff[2] == 'n' ? 6 : 7; break;
^
cc1plus.exe: some warnings being treated as errors
exit status 1
Error compiling for board ESP32 Dev Module.
Board is ESP32 dev module (wroom)
Arduino IDE is 1.8.12
Sketch compiles and works as expected with UNO
Any and all help appreciated, thanks
After compiling, I get:
Arduino: 1.8.12 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp: In constructor 'DateTime::DateTime(const char*, const char*)':
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp:136:70: error: operation on '((DateTime*)this)->DateTime::m' may be undefined [-Werror=sequence-point]
case 'J': m = date[1] == 'a' ? 1 : m = date[2] == 'n' ? 6 : 7; break;
^
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp: In constructor 'DateTime::DateTime(const __FlashStringHelper*, const __FlashStringHelper*)':
C:\Users\ButchHam\Documents\Arduino Butch code\libraries\RTClib\RTClib.cpp:161:70: error: operation on '((DateTime*)this)->DateTime::m' may be undefined [-Werror=sequence-point]
case 'J': m = buff[1] == 'a' ? 1 : m = buff[2] == 'n' ? 6 : 7; break;
^
cc1plus.exe: some warnings being treated as errors
exit status 1
Error compiling for board ESP32 Dev Module.
Board is ESP32 dev module (wroom)
Arduino IDE is 1.8.12
Sketch compiles and works as expected with UNO
Any and all help appreciated, thanks