From 5f1fc92b13a964e883091dae7c3701c662dfdc96 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 14 May 2023 21:55:43 +0200 Subject: Fix -Wtautological-constant-out-of-range-compare in regress_http under OSX compiler warning: test/regress_http.c:968:38: warning: result of comparison of constant 65536 with expression of type 'enum evhttp_cmd_type' is always true [-Wtautological-constant-out-of-range-compare] if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ --- test/regress_http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/regress_http.c b/test/regress_http.c index 626908c6..1af425e3 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -965,7 +965,8 @@ http_custom_cb(struct evhttp_request *req, void *arg) int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL; /* Expecting a CUSTOM request */ - if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) { + uint32_t command = evhttp_request_get_command(req); + if (command != EVHTTP_REQ_CUSTOM) { fprintf(stdout, "FAILED (custom type)\n"); exit(1); } -- cgit v1.2.1