From b0a8d09ebde82ab49f3fff50d090bc9f40b7cb5d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 22 May 2020 18:04:26 +0800 Subject: [PATCH] include/interval_set: no need to check if an unsigned greater or equal to 0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this silences the warning of ../src/include/interval_set.h:512:23: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits] 512 | ceph_assert(_size >= 0); Signed-off-by: Kefu Chai --- src/include/interval_set.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/include/interval_set.h b/src/include/interval_set.h index 5b2b90d87ac1..3090ef9570f5 100644 --- a/src/include/interval_set.h +++ b/src/include/interval_set.h @@ -509,7 +509,6 @@ class interval_set { void erase(iterator &i) { _size -= i.get_len(); - ceph_assert(_size >= 0); m.erase(i._iter); } @@ -522,7 +521,6 @@ class interval_set { auto p = find_inc_m(start); _size -= len; - ceph_assert(_size >= 0); ceph_assert(p != m.end()); ceph_assert(p->first <= start); -- 2.47.3