So, I get this warning (using Makefile and GCC 13.3.1 ) :
I do not get this warning when using TD on Arduino, so it has something to do with GCC version and default warning configurations.
The question is not how to get rid of the warning, but what it exactly means, is there potential incompatibility between Print.h and SdFat.h and how to best modify code (and then making a PR).
To answer the Question, why using GCC 13.3.1? Because I had it installed for another reason.
Code:
In file included from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/cores/teensy4/Stream.h:24,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/cores/teensy4/HardwareSerial.h:115,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/cores/teensy4/WProgram.h:47,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/cores/teensy4/Arduino.h:6,
from C:/Users/zimme/Documents/LC-MARE/microPAM/microPAM_V3.ino:31:
C:/Users/zimme/AppData/Local/Arduino15/packages/teensy/hardware/avr/0.60.2/libraries/SdFat/src/common/ArduinoFiles.h: In instantiation of 'class PrintFile<FsBaseFile>':
\Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/libraries/SdFat/src/SdFat.h:495:23: required from here
\Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/cores/teensy4/Print.h:61:24: warning: 'virtual size_t Print::write(const uint8_t*, size_t)' was hidden [-Woverloaded-virtual=]
61 | virtual size_t write(const uint8_t *buffer, size_t size);
| ^~~~~
In file included from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/libraries/SdFat/src/ExFatLib/ExFatFile.h:821,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/libraries/SdFat/src/ExFatLib/ExFatVolume.h:27,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/libraries/SdFat/src/ExFatLib/ExFatLib.h:27,
from \Users\zimme\AppData\Local\Arduino15\packages\teensy/hardware/avr/0.60.2/libraries/SdFat/src/SdFat.h:35,
from C:/Users/zimme/Documents/LC-MARE/microPAM/src/Storage.h:38,
from C:/Users/zimme/Documents/LC-MARE/microPAM/src/MTP.h:37,
from C:/Users/zimme/Documents/LC-MARE/microPAM/microPAM_V3.ino:68:
C:/Users/zimme/AppData/Local/Arduino15/packages/teensy/hardware/avr/0.60.2/libraries/SdFat/src/common/ArduinoFiles.h:53:10: note: by 'PrintFile<FsBaseFile>::write'
53 | size_t write(uint8_t b) {
| ^~~~~
The question is not how to get rid of the warning, but what it exactly means, is there potential incompatibility between Print.h and SdFat.h and how to best modify code (and then making a PR).
To answer the Question, why using GCC 13.3.1? Because I had it installed for another reason.