Skip to content

Fix missing forward declaration for sendSecurityHeaders in Server sketch#283

Merged
dorkmo merged 2 commits intomasterfrom
copilot/fix-arduino-compilation-error-please-work
Apr 2, 2026
Merged

Fix missing forward declaration for sendSecurityHeaders in Server sketch#283
dorkmo merged 2 commits intomasterfrom
copilot/fix-arduino-compilation-error-please-work

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

sendSecurityHeaders was introduced in a recent security commit but only defined at line ~6550, after its first call site in handleLoginPost (~line 6005), causing a compile error on Arduino's single-pass C++ compiler.

Change

Added a forward declaration alongside the existing block of static function declarations:

// HTTP response helper (security headers, defined in web server section)
static void sendSecurityHeaders(EthernetClient &client);

Follows the same pattern already used for respondStatus, respondJson, handleConfigPost, and all other static functions called before their definitions in this sketch.

Copilot AI changed the title [WIP] Fix Arduino compilation error in TankAlarm-112025 Server Fix missing forward declaration for sendSecurityHeaders in Server sketch Apr 2, 2026
Copilot AI requested a review from dorkmo April 2, 2026 21:31
@dorkmo dorkmo marked this pull request as ready for review April 2, 2026 21:32
Copilot AI review requested due to automatic review settings April 2, 2026 21:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an Arduino compile error in the Server sketch by adding a missing forward declaration for sendSecurityHeaders, which is called before its definition due to the sketch’s single-pass compilation constraints.

Changes:

  • Added a forward declaration for static void sendSecurityHeaders(EthernetClient &client); in the existing static function declaration block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dorkmo dorkmo merged commit 251744e into master Apr 2, 2026
4 checks passed
@dorkmo dorkmo deleted the copilot/fix-arduino-compilation-error-please-work branch April 2, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arduino Compilation Error in TankAlarm-112025-Server-BluesOpta (2026-04-02)

3 participants