From c463c08d982cd41a13cdfd359ccb38afbc8eb8b0 Mon Sep 17 00:00:00 2001 From: David Hu Date: Tue, 4 Dec 2018 14:59:39 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20compiler=20warnings=20for=20AsyncJson?= =?UTF-8?q?=E2=80=99s=20=5FcontentLength/=5FmaxContentLength=20vars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The type of _contentLength and _maxContentLength should both be unsigned integer type size_t. --- src/AsyncJson.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AsyncJson.h b/src/AsyncJson.h index 8412159bc..ec49a2d29 100644 --- a/src/AsyncJson.h +++ b/src/AsyncJson.h @@ -105,8 +105,8 @@ class AsyncCallbackJsonWebHandler: public AsyncWebHandler { const String _uri; WebRequestMethodComposite _method; ArJsonRequestHandlerFunction _onRequest; - int _contentLength; - int _maxContentLength; + size_t _contentLength; + size_t _maxContentLength; public: AsyncCallbackJsonWebHandler(const String& uri, ArJsonRequestHandlerFunction onRequest) : _uri(uri), _method(HTTP_POST|HTTP_PUT|HTTP_PATCH), _onRequest(onRequest), _maxContentLength(16384) {} void setMethod(WebRequestMethodComposite method){ _method = method; }