From e623dfedf3d8f8b594a14273555badc35d383b47 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 14 May 2019 16:17:41 -0400 Subject: [PATCH] Update httplib.h CPPHTTPLIB_PAYLOAD_MAX_LENGTH is only used in one place, that is to initialize payload_max_length_. Because payload_max_length_ is a size_t, attempts to intialize it with a 64 bit integer max will generate warnings, notably on 32 bit compilers. Changing the max to the same size as the target resolves that, and this should be no risk. --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 3a9450a..97a3a2e 100644 --- a/httplib.h +++ b/httplib.h @@ -88,7 +88,7 @@ typedef int socket_t; #define CPPHTTPLIB_KEEPALIVE_TIMEOUT_USECOND 0 #define CPPHTTPLIB_KEEPALIVE_MAX_COUNT 5 #define CPPHTTPLIB_REQUEST_URI_MAX_LENGTH 8192 -#define CPPHTTPLIB_PAYLOAD_MAX_LENGTH std::numeric_limits::max() +#define CPPHTTPLIB_PAYLOAD_MAX_LENGTH std::numeric_limits::max() namespace httplib {