Closed
Bug 733448
Opened 13 years ago
Closed 13 years ago
fix compiler warnings in mailnews/base/src/nsMsgDBView.cpp
Categories
(MailNews Core :: Database, defect)
MailNews Core
Database
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 14.0
People
(Reporter: aceman, Assigned: aceman)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
6.67 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
Some of the warning seem to be real problems:
mailnews/base/src/nsMsgDBView.cpp: In member function 'nsresult nsMsgDBView::FetchRowKeywords(nsMsgViewIndex, nsIMsgDBHdr*, nsACString_internal&)':
mailnews/base/src/nsMsgDBView.cpp:932:38: warning: comparison between signed and unsigned integer expressions
mailnews/base/src/nsMsgDBView.cpp: In member function 'void nsMsgDBView::RememberDeletedMsgHdr(nsIMsgDBHdr*)':
mailnews/base/src/nsMsgDBView.cpp:1945:65: warning: operation on '((nsMsgDBView*)this)->nsMsgDBView::mRecentlyDeletedArrayIndex' may be undefined
mailnews/base/src/nsMsgDBView.cpp: In member function 'virtual nsMsgViewIndex nsMsgDBView::FindKey(nsMsgKey, bool)':
mailnews/base/src/nsMsgDBView.cpp:4833:33: warning: suggest parentheses around '&&' within '||'
mailnews/base/src/nsMsgDBView.cpp: In member function 'virtual nsresult nsMsgDBView::GetMsgToSelectAfterDelete(nsMsgViewIndex*)':
mailnews/base/src/nsMsgDBView.cpp:7096:11: warning: 'startFirstRange' may be used uninitialized in this function
mailnews/base/src/nsMsgDBView.cpp: In member function 'nsresult nsMsgDBView::GetCollationKey(nsIMsgDBHdr*, nsMsgViewSortTypeValue, PRUint8**, PRUint32*, nsIMsgCustomColumnHandler*)':
mailnews/base/src/nsMsgDBView.cpp:4174:12: warning: 'rv' may be used uninitialized in this function
Please check I do not change the logic somewhere. xpcshell tests pass normally.
Attachment #603364 -
Flags: review?(dbienvenu)
Comment 2•13 years ago
|
||
Comment on attachment 603364 [details] [diff] [review]
patch
this should be reformatted so that the lines are 80 chars or less, the || is at the end of the line, and second line of the if is indented under the first (, not lining up with the retIndex line.
- if ((flags & nsMsgMessageFlags::Elided) && NS_SUCCEEDED(ExpandByIndex(threadIndex, nsnull))
+ if (((flags & nsMsgMessageFlags::Elided) && NS_SUCCEEDED(ExpandByIndex(threadIndex, nsnull)))
|| (flags & MSG_VIEW_FLAG_DUMMY))
retIndex = (nsMsgViewIndex) m_keys.IndexOf(key, threadIndex + 1);
I'll look at the logic of it in a bit...
Blocks: buildwarning
Comment 3•13 years ago
|
||
Comment on attachment 603364 [details] [diff] [review]
patch
NS_ASSERTION(false,"should not be here (Sort Type: byCustom (String), but no custom handler)");
-
should be NS_ERROR("should...")
other than that, it looks ok, though I need to double check this change:
+ if (((flags & nsMsgMessageFlags::Elided) && NS_SUCCEEDED(ExpandByIndex(threadIndex, nsnull)))
|| (flags & MSG_VIEW_FLAG_DUMMY))
Comment 4•13 years ago
|
||
Comment on attachment 603364 [details] [diff] [review]
patch
thx for the patch
Attachment #603364 -
Flags: review?(dbienvenu) → review+
Comment 6•13 years ago
|
||
(In reply to :aceman from comment #5)
> I assume I still have to fix the nits in comment 2 and 3?
yes, please, thx.
Thanks, r=bienvenu.
Attachment #603364 -
Attachment is obsolete: true
Attachment #610578 -
Flags: review+
Severity: minor → trivial
Keywords: checkin-needed
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
You need to log in
before you can comment on or make changes to this bug.
Description
•