Closed Bug 943655 Opened 7 years ago Closed 7 years ago
Fix compiler warnings "variable 'err' set but not used [-Wunused-but-set-variable]" in /mailnews/base/search
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 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+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 28.0
You need to log in before you can comment on or make changes to this bug.