]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
messages: fix out of range assertion 11345/head
authorJohn Spray <john.spray@redhat.com>
Thu, 6 Oct 2016 10:20:47 +0000 (12:20 +0200)
committerJohn Spray <john.spray@redhat.com>
Fri, 21 Oct 2016 10:38:19 +0000 (11:38 +0100)
commitace4abbee5c3f91ff025b8348b31ada423181c24
tree77c9bc837292ff32aff2c2cce55e64485d9aba2a
parenta1fd258ad29ede69d889e325dce6d8f486822cf4
messages: fix out of range assertion

When clang uses an 8 bit type for the enum, it
complains (out of range) if comparing <256,
and complains (tautological) if comparing <=256.

Avoid this by explicitly making the enum an
uint8_t, and just asserting that that it has
that size at the point that we assume so for
the encoding (in case someone modified the
type definition without checking how it was used).

Signed-off-by: John Spray <john.spray@redhat.com>
src/common/perf_counters.h
src/messages/MMgrReport.h