Project

General

Profile

Actions

Bug #7623

closed

local 'best' uninitialized in Objecter

Added by Dan Mick about 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Actions #1

Updated by Dan Mick about 10 years ago

  • 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.

Actions #2

Updated by Loïc Dachary over 9 years ago

  • Status changed from New to Resolved

Fixed by 605e645026487519d4195358330832b3369b531d

Actions

Also available in: Atom PDF