]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd_types: pg_t::is_split(): use unsigned for bits operations
authorKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 05:58:08 +0000 (13:58 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 07:00:30 +0000 (15:00 +0800)
commit97eb2ad72df825817c2eeb4c12ab846c01751c98
treebd797b742d38db769c1c94040897662584a95f7b
parent4d2eb9a20d863a4e4b7b5ff6d1bc70cbc58f3aa5
osd_types: pg_t::is_split(): use unsigned for bits operations

this silences the warning of

The result of the '<<' expression is undefined

quote from n3337, ยง5.8 expr.shift:

If E1 has an unsigned type, the value ... (is deterministic)...
Otherwise, if E1 has a signed type and non-negative value, and E1 x 2^E2
is representable in the result type, then that is the resulting value;
otherwise, the behavior is undefined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/osd_types.cc