Skip to content

Subject: SimpleFTPServer deprecated flush() calls with ESP32 Arduino Core 3.3.7** #94

@kellnerp

Description

@kellnerp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions