From 5c11ff1a305e463d0b78782555b14acb458d99ad Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 4 Dec 2017 15:12:27 +0000 Subject: [PATCH] Correctly cast to int in debug message. A `class enum` is not implicitly cast to an `int`. It is better to explicitly cast it to avoid future error with different versions of compiler. --- src/server/request_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/request_context.cpp b/src/server/request_context.cpp index 8ccd5f6..d2e680a 100644 --- a/src/server/request_context.cpp +++ b/src/server/request_context.cpp @@ -129,7 +129,7 @@ int RequestContext::fill_argument(void *__this, enum MHD_ValueKind kind, void RequestContext::print_debug_info() { printf("method : %s (%d)\n", method==RequestMethod::GET ? "GET" : method==RequestMethod::POST ? "POST" : - "OTHER", method); + "OTHER", (int)method); printf("version : %s\n", version.c_str()); printf("headers :\n"); for (auto it=headers.begin(); it!=headers.end(); it++) {