]> git.apps.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)
committerShylesh Kumar <shylesh.mohan@gmail.com>
Mon, 9 Apr 2018 09:31:41 +0000 (15:01 +0530)
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 cc0a93c366778d22ec7e4fa4784dfece86c17303..62ac82ddac1b94bf9bc8e9765bacbc25fdeb3cb1 100644 (file)
@@ -4114,7 +4114,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();
 }