The following warnings appear when compiling SimpleFTPServer with ESP32 Arduino Core 3.3.7:
FtpServer.cpp:1036: warning: 'virtual void NetworkClient::flush()' is deprecated: Use clear() instead.
FtpServer.cpp:1555: warning: 'virtual void NetworkClient::flush()' is deprecated: Use clear() instead.
FtpServer.cpp:2190: warning: 'virtual void NetworkClient::flush()' is deprecated: Use clear() instead.
In ESP32 Core 3.x, NetworkClient::flush() has been deprecated in favour of NetworkClient::clear(). The three calls to data.flush() in FtpServer.cpp at lines 1036, 1555, and 2190 should be updated to data.clear().
Environment:
- ESP32 Arduino Core: 3.3.7
- Board: XIAO ESP32-S3
- SimpleFTPServer version: 3.0.2
This is a simple find/replace — no functional change, just silences the deprecation warnings.
My AI suggested this because I was getting a lot of warnings during compile.
The following warnings appear when compiling SimpleFTPServer with ESP32 Arduino Core 3.3.7:
In ESP32 Core 3.x,
NetworkClient::flush()has been deprecated in favour ofNetworkClient::clear(). The three calls todata.flush()inFtpServer.cppat lines 1036, 1555, and 2190 should be updated todata.clear().Environment:
This is a simple find/replace — no functional change, just silences the deprecation warnings.
My AI suggested this because I was getting a lot of warnings during compile.