]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix signed/unsigned comparison compiler warning
authorJeff Layton <jlayton@redhat.com>
Thu, 14 Sep 2017 16:22:52 +0000 (12:22 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 23 Jan 2018 23:07:36 +0000 (00:07 +0100)
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 <jlayton@redhat.com>
(cherry picked from commit e057b6770b5545f327990cbaf17e7a391e3e8a50)

src/client/Client.cc

index 1d9277a61b6ecfb1d5c01f83d2aedc4418600e3f..c358dcf3bdc945357eb345af770a2889f17ebb09 100644 (file)
@@ -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();
 }