Closed
Bug 943655
Opened 11 years ago
Closed 11 years ago
Fix compiler warnings "variable 'err' set but not used [-Wunused-but-set-variable]" in /mailnews/base/search
Categories
(MailNews Core :: Search, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 28.0
People
(Reporter: aceman, Assigned: aceman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
2.30 KB,
patch
|
rkent
:
review+
|
Details | Diff | Splinter Review |
mailnews/base/search/src/nsMsgSearchNews.cpp:406:14: warning: variable 'err' set but not used [-Wunused-but-set-variable]
nsresult err = NS_OK;
^
mailnews/base/search/src/nsMsgLocalSearch.cpp:404:14: warning: variable 'err' set but not used [-Wunused-but-set-variable]
nsresult err = NS_OK;
^
In the nsMsgSearchOfflineMail::ProcessSearchTerm function, we assign 'err' the return value from the various matching functions, assign even a constant err = NS_ERROR_INVALID_ARG value but we never return that to the caller. hg blame says this was like this since version 0... It looks like it was intended to return err.
I've run xpcshell tests on this and didn't see any obvious failures from the change.
Attachment #8338902 -
Flags: review?(kent)
Comment 2•11 years ago
|
||
Comment on attachment 8338902 [details] [diff] [review]
patch
It looks like the return from ProcessSearchTerm is never actually checked, but that does not mean we shouldn't fix the warnings. r=me
Attachment #8338902 -
Flags: review?(kent) → review+
Keywords: checkin-needed
Comment 3•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 28.0
You need to log in
before you can comment on or make changes to this bug.
Description
•