mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-09-26 06:10:55 +02:00
Fix warnings
This commit is contained in:
@@ -142,7 +142,7 @@ void setup() {
|
|||||||
|
|
||||||
// receives JSON and sends JSON
|
// receives JSON and sends JSON
|
||||||
jsonHandler->onRequest([](AsyncWebServerRequest* request, JsonVariant& json) {
|
jsonHandler->onRequest([](AsyncWebServerRequest* request, JsonVariant& json) {
|
||||||
JsonObject jsonObj = json.as<JsonObject>();
|
// JsonObject jsonObj = json.as<JsonObject>();
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
AsyncJsonResponse* response = new AsyncJsonResponse();
|
AsyncJsonResponse* response = new AsyncJsonResponse();
|
||||||
@@ -165,7 +165,7 @@ void setup() {
|
|||||||
|
|
||||||
// receives MessagePack and sends MessagePack
|
// receives MessagePack and sends MessagePack
|
||||||
msgPackHandler->onRequest([](AsyncWebServerRequest* request, JsonVariant& json) {
|
msgPackHandler->onRequest([](AsyncWebServerRequest* request, JsonVariant& json) {
|
||||||
JsonObject jsonObj = json.as<JsonObject>();
|
// JsonObject jsonObj = json.as<JsonObject>();
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
AsyncMessagePackResponse* response = new AsyncMessagePackResponse();
|
AsyncMessagePackResponse* response = new AsyncMessagePackResponse();
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags =
|
build_flags =
|
||||||
-Wall -Wextra
|
-Wall -Wextra
|
||||||
|
-Wno-unused-parameter
|
||||||
-D CONFIG_ARDUHAL_LOG_COLORS
|
-D CONFIG_ARDUHAL_LOG_COLORS
|
||||||
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
|
||||||
-D CONFIG_ASYNC_TCP_MAX_ACK_TIME=3000
|
-D CONFIG_ASYNC_TCP_MAX_ACK_TIME=3000
|
||||||
|
@@ -335,11 +335,15 @@ class AsyncWebServerRequest {
|
|||||||
void sendChunked(const char* contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr) { send(beginChunkedResponse(contentType, callback, templateCallback)); }
|
void sendChunked(const char* contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr) { send(beginChunkedResponse(contentType, callback, templateCallback)); }
|
||||||
void sendChunked(const String& contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr) { send(beginChunkedResponse(contentType, callback, templateCallback)); }
|
void sendChunked(const String& contentType, AwsResponseFiller callback, AwsTemplateProcessor templateCallback = nullptr) { send(beginChunkedResponse(contentType, callback, templateCallback)); }
|
||||||
|
|
||||||
|
#ifndef ESP8266
|
||||||
[[deprecated("Replaced by send(...)")]]
|
[[deprecated("Replaced by send(...)")]]
|
||||||
|
#endif
|
||||||
void send_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) {
|
void send_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) {
|
||||||
send(code, contentType, content, len, callback);
|
send(code, contentType, content, len, callback);
|
||||||
}
|
}
|
||||||
|
#ifndef ESP8266
|
||||||
[[deprecated("Replaced by send(...)")]]
|
[[deprecated("Replaced by send(...)")]]
|
||||||
|
#endif
|
||||||
void send_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
|
void send_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
|
||||||
send(code, contentType, content, callback);
|
send(code, contentType, content, callback);
|
||||||
}
|
}
|
||||||
@@ -372,11 +376,15 @@ class AsyncWebServerRequest {
|
|||||||
AsyncResponseStream* beginResponseStream(const char* contentType, size_t bufferSize = 1460);
|
AsyncResponseStream* beginResponseStream(const char* contentType, size_t bufferSize = 1460);
|
||||||
AsyncResponseStream* beginResponseStream(const String& contentType, size_t bufferSize = 1460) { return beginResponseStream(contentType.c_str(), bufferSize); }
|
AsyncResponseStream* beginResponseStream(const String& contentType, size_t bufferSize = 1460) { return beginResponseStream(contentType.c_str(), bufferSize); }
|
||||||
|
|
||||||
|
#ifndef ESP8266
|
||||||
[[deprecated("Replaced by beginResponse(...)")]]
|
[[deprecated("Replaced by beginResponse(...)")]]
|
||||||
|
#endif
|
||||||
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) {
|
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) {
|
||||||
return beginResponse(code, contentType.c_str(), content, len, callback);
|
return beginResponse(code, contentType.c_str(), content, len, callback);
|
||||||
}
|
}
|
||||||
|
#ifndef ESP8266
|
||||||
[[deprecated("Replaced by beginResponse(...)")]]
|
[[deprecated("Replaced by beginResponse(...)")]]
|
||||||
|
#endif
|
||||||
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
|
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
|
||||||
return beginResponse(code, contentType.c_str(), content, callback);
|
return beginResponse(code, contentType.c_str(), content, callback);
|
||||||
}
|
}
|
||||||
@@ -590,7 +598,9 @@ class AsyncWebServerResponse {
|
|||||||
virtual bool removeHeader(const char* name);
|
virtual bool removeHeader(const char* name);
|
||||||
virtual const AsyncWebHeader* getHeader(const char* name) const;
|
virtual const AsyncWebHeader* getHeader(const char* name) const;
|
||||||
|
|
||||||
|
#ifndef ESP8266
|
||||||
[[deprecated("Use instead: _assembleHead(String& buffer, uint8_t version)")]]
|
[[deprecated("Use instead: _assembleHead(String& buffer, uint8_t version)")]]
|
||||||
|
#endif
|
||||||
String _assembleHead(uint8_t version) {
|
String _assembleHead(uint8_t version) {
|
||||||
String buffer;
|
String buffer;
|
||||||
_assembleHead(buffer, version);
|
_assembleHead(buffer, version);
|
||||||
|
Reference in New Issue
Block a user