]> git.ipfire.org Git - thirdparty/samba.git/commit
ctdb-daemon: Avoid signed/unsigned comparison by declaring as unsigned
authorMartin Schwenke <martin@meltin.net>
Thu, 1 Aug 2019 00:55:39 +0000 (10:55 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 14 Aug 2019 09:11:36 +0000 (09:11 +0000)
commit4bdfbbd8d4fb681d509d702a8a357b11c8dddcac
tree7818d3f8ed936709384fb146e0a83237fd86282d
parent5a3d99dc7ad49717252d8c9625e0f8d064cffcd8
ctdb-daemon: Avoid signed/unsigned comparison by declaring as unsigned

Compiling with -Wsign-compare complains:

ctdb/server/ctdb_call.c:831:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  831 |  if (count <= ctdb_db->statistics.hot_keys[0].count) {
      |            ^~

and

ctdb/server/ctdb_call.c:844:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  844 |   if (count <= ctdb_db->statistics.hot_keys[i].count) {
      |             ^~

Found by cs-build.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_call.c