From: Jeff Layton Date: Thu, 14 Sep 2017 16:22:52 +0000 (-0400) Subject: client: fix signed/unsigned comparison compiler warning X-Git-Tag: v12.2.3~160^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8db3ecd6c759251fa8105aeb676e74f9c9302027;p=ceph.git client: fix signed/unsigned comparison compiler warning The build says: src/client/Client.cc: In member function ‘void Client::trim_caps(MetaSession*, int)’: src/client/Client.cc:4121:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (s->caps.size() > max) ~~~~~~~~~~~~~~~^~~~~ Signed-off-by: Jeff Layton (cherry picked from commit e057b6770b5545f327990cbaf17e7a391e3e8a50) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 1d9277a61b6e..c358dcf3bdc9 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4113,7 +4113,8 @@ void Client::trim_caps(MetaSession *s, int max) } } - if (s->caps.size() > max) + caps_size = s->caps.size(); + if (caps_size > max) _invalidate_kernel_dcache(); }