From: Greg Farnum Date: Fri, 10 Mar 2017 22:42:41 +0000 (-0800) Subject: osd: fix a signed/unsigned warning in PG X-Git-Tag: v12.0.1~49^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4e4713a01b67615404e2eed2302656b1b77057b;p=ceph.git osd: fix a signed/unsigned warning in PG It would be nice if the stats were unsigned, since they can't go negative, but that's not the world we live in. (Also, we probably use these structures as deltas which *do* need to go negative? I didn't check.) Signed-off-by: Greg Farnum --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 3a75d8932e92..e6994c284f70 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2584,7 +2584,7 @@ void PG::_update_calc_stats() if ((is_degraded() || is_undersized() || !is_clean()) && is_peered()) { // NOTE: we only generate copies, degraded, misplaced and unfound // values for the summation, not individual stat categories. - uint64_t num_objects = info.stats.stats.sum.num_objects; + int64_t num_objects = info.stats.stats.sum.num_objects; // Total sum of all missing int64_t missing = 0;