Bug #7623
closed
- Priority changed from Normal to Low
osdc/Objecter.cc: In member function 'int Objecter::recalc_op_target(Objecter::Op*)':
warning: osdc/Objecter.cc:1520:19: 'best' may be used uninitialized in this function [-Wmaybe-uninitialized]
shows up in the build (introduced in 22df77325165157c47bc782476e0e3ab9cf652c4 from Oct '13). As the current code is written I think there's no bug, because best and best_locality will always be set on pass 0 through the loop, but given how complex the if condition is, one can imagine another fix breaking something; it'd be easy to initialize both locals to avoid the problem.
plus warnings are bad mmk.
- Status changed from New to Resolved
Fixed by 605e645026487519d4195358330832b3369b531d
Also available in: Atom
PDF