]> 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)
committerJeff Layton <jlayton@redhat.com>
Sat, 16 Sep 2017 11:57:04 +0000 (07:57 -0400)
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>
src/client/Client.cc

index 6781651b600000a6e2ca947382153b3bea3cf4a8..87e4323860dca664c8ebdeca084769cc300efd1b 100644 (file)
@@ -4118,7 +4118,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();
 }