]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
interval_set: silence "set but unused" warning
authorKefu Chai <kchai@redhat.com>
Thu, 7 Sep 2017 05:11:20 +0000 (13:11 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 7 Sep 2017 05:13:35 +0000 (13:13 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/interval_set.h

index 5578c1ccc5d5278d33700d72add2a0fd2095c382..a8446ad080880ce8d3800bb36863672de0c62d0c 100644 (file)
@@ -239,17 +239,14 @@ class interval_set {
   void intersection_size_asym(const interval_set &s, const interval_set &l) {
     typename decltype(m)::const_iterator ps = s.m.begin(), pl;
     assert(ps != s.m.end());
-    T offset = ps->first, prev_offset;
+    T offset = ps->first;
     bool first = true;
     typename decltype(m)::iterator mi = m.begin();
 
     while (1) {
       if (first)
         first = false;
-      else
-        assert(offset > prev_offset);
       pl = l.find_inc(offset);
-      prev_offset = offset;
       if (pl == l.m.end())
         break;
       while (ps != s.m.end() && ps->first + ps->second <= pl->first)