Skip to content

Commit e663695

Browse files
authored
Merge pull request #120 from SenaxInc/copilot/fix-arduino-compilation-error-again
Fix Arduino compilation error: add forward declaration for respondStatus
2 parents 1399fba + c618e9c commit e663695

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ static bool pinMatches(const char *pin) {
388388
return strncmp(pin, gConfig.configPin, sizeof(gConfig.configPin)) == 0;
389389
}
390390

391+
// Forward declaration for respondStatus (defined later in the web server section)
392+
static void respondStatus(EthernetClient &client, int status, const String &message);
393+
391394
// Require that a valid admin PIN is configured and provided; respond with 403/400 on failure.
392395
static bool requireValidPin(EthernetClient &client, const char *pinValue) {
393396
if (gConfig.configPin[0] == '\0') {
@@ -4863,7 +4866,7 @@ static void handleWebRequests();
48634866
static bool readHttpRequest(EthernetClient &client, String &method, String &path, String &body, size_t &contentLength, bool &bodyTooLarge);
48644867
static void respondHtml(EthernetClient &client, const String &body);
48654868
static void respondJson(EthernetClient &client, const String &body, int status = 200);
4866-
static void respondStatus(EthernetClient &client, int status, const String &message);
4869+
// Note: respondStatus is forward-declared earlier in the file (before requireValidPin)
48674870
static void sendDashboard(EthernetClient &client);
48684871
static void sendClientConsole(EthernetClient &client);
48694872
static void sendConfigGenerator(EthernetClient &client);

0 commit comments

Comments
 (0)