From: Kefu Chai Date: Fri, 22 May 2020 10:04:26 +0000 (+0800) Subject: include/interval_set: no need to check if an unsigned greater or equal to 0 X-Git-Tag: v16.1.0~2216^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0a8d09ebde82ab49f3fff50d090bc9f40b7cb5d;p=ceph.git include/interval_set: no need to check if an unsigned greater or equal to 0 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 --- diff --git a/src/include/interval_set.h b/src/include/interval_set.h index 5b2b90d87ac..3090ef9570f 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);