Closed Bug 283670 Opened 19 years ago Closed 19 years ago

[Coverity] Uninitialized rowCount var in nsAutoCompleteController::RowIndexToSearch

Categories

(Toolkit :: Autocomplete, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: brendan, Assigned: brendan)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file)

Coverity's SWAT static analyzer suite found this one.  It's obvious, and once
you initialize rowCount to 1, the whole if (searchResult == ...FAILURE) {...}
becomes dead code.  Patch next.

/be
Attached patch fixSplinter Review
Only issue is what hewitt might have had in mind with that GetErrorDescription
call.  Might have been late-night copy-paste programming -- elsewhere, when not
failing, the error string is returned as a result string from other methods,
e.g., nsAutoCompleteController::GetResultValueAt.

Fixed a few bogusly selective or "partial" else after returns too.

/be
Attachment #175572 - Flags: second-review?(dveditz)
Attachment #175572 - Flags: first-review?(bryner)
Comment on attachment 175572 [details] [diff] [review]
fix

r=dveditz
Attachment #175572 - Flags: second-review?(dveditz) → second-review+
Attachment #175572 - Flags: first-review?(bryner) → first-review+
Fixed on trunk.  Nominate for 1.0.2 when you can.

/be
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: coverity
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: