diff options
author | Azat Khuzhin <azat@libevent.org> | 2023-05-14 21:55:43 +0200 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2023-05-14 21:55:43 +0200 |
commit | 5f1fc92b13a964e883091dae7c3701c662dfdc96 (patch) | |
tree | d03c2fee0becd2c85856a1db2a804a685fd6e127 | |
parent | d19690980d4b04f39327f4c1036c776a5081be0c (diff) | |
download | libevent-5f1fc92b13a964e883091dae7c3701c662dfdc96.tar.gz |
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) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
-rw-r--r-- | test/regress_http.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |