Skip to content

Commit

Permalink
tools/rebuild_mondb: kill compiling warning
Browse files Browse the repository at this point in the history
As follow:

[ 72%] Building CXX object src/tools/CMakeFiles/ceph-objectstore-tool.dir/RadosDump.cc.o
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc: In function ‘int update_mon_db(ObjectStore&, OSDSuperblock&, const string&, const string&)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc:289:22: warning: ‘crc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (have_crc && osdmap.get_crc() != crc) {
                      ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc:238:14: note: ‘crc’ was declared here
     uint32_t crc;

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Sep 18, 2016
1 parent a6cf4a4 commit f16a314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/rebuild_mondb.cc
Expand Up @@ -235,7 +235,7 @@ int update_osdmap(ObjectStore& fs, OSDSuperblock& sb, MonitorDBStore& ms)
for (auto e = max(last_committed+1, sb.oldest_map);
e <= sb.newest_map; e++) {
bool have_crc = false;
uint32_t crc;
uint32_t crc = -1;
uint64_t features = 0;
// add inc maps
{
Expand Down

0 comments on commit f16a314

Please sign in to comment.