From: Martin Schwenke Date: Thu, 1 Aug 2019 00:58:42 +0000 (+1000) Subject: ctdb-daemon: Avoid signed/unsigned comparison by casting X-Git-Tag: tdb-1.4.2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c9d1f855ea3fe3d12f712678b7b4347f8982977;p=thirdparty%2Fsamba.git ctdb-daemon: Avoid signed/unsigned comparison by casting Compiling with -Wsign-compare complains: 1047 | && (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) { | ^~ struct ctdb_call is a protocol element, so we can't simply change it. Found by csbuild. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Wed Aug 14 10:29:59 UTC 2019 on sn-devel-184 --- diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c index 876ae448cca..9e1c51bf57d 100644 --- a/ctdb/server/ctdb_call.c +++ b/ctdb/server/ctdb_call.c @@ -1044,7 +1044,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) } } if ((c->flags & CTDB_WANT_READONLY) - && (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) { + && ((unsigned int)call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) { TDB_DATA tdata; tdata = tdb_fetch(ctdb_db->rottdb, call->key);