Closed
Bug 488982
Opened 15 years ago
Closed 7 years ago
5 * |mailnews/base/src/nsMsgDBView.cpp(...) : warning C4018: '...' : signed/unsigned mismatch|, and 3 in nsMsgThreadedDBView.cpp
Categories
(MailNews Core :: Database, defect)
MailNews Core
Database
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sgautherie, Unassigned)
References
Details
Attachments
(1 file)
1.33 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090417 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4) (http://hg.mozilla.org/mozilla-central/rev/9e06217fc471 +http://hg.mozilla.org/comm-central/rev/...) { mailnews/base/src/nsMsgDBView.cpp(4667) : warning C4018: '<' : signed/unsigned mismatch mailnews/base/src/nsMsgDBView.cpp(5187) : warning C4018: '<' : signed/unsigned mismatch mailnews/base/src/nsMsgDBView.cpp(6453) : warning C4018: '<' : signed/unsigned mismatch mailnews/base/src/nsMsgDBView.cpp(6967) : warning C4018: '>=' : signed/unsigned mismatch mailnews/base/src/nsMsgDBView.cpp(6985) : warning C4018: '<' : signed/unsigned mismatch } Issue seems to be that nsMsgViewIndex type is unsigned long, but { PRInt32 GetSize(void) {return(m_keys.Length());} } instead of a PRUint32 (from nsTArray). Simply fixing GetSize() return type triggers opposite warnings elsewhere... How (= which way) do you want this fixed?
Reporter | ||
Comment 1•15 years ago
|
||
Also: { mailnews/base/src/nsMsgThreadedDBView.cpp(107) : warning C4018: '<' : signed/unsigned mismatch mailnews/base/src/nsMsgThreadedDBView.cpp(716) : warning C4018: '<' : signed/unsigned mismatch mailnews/base/src/nsMsgThreadedDBView.cpp(781) : warning C4018: '<' : signed/unsigned mismatch } The former I'll fix, the latters are the same issue.
Summary: 5 * |mailnews/base/src/nsMsgDBView.cpp(...) : warning C4018: '...' : signed/unsigned mismatch| → 5 * |mailnews/base/src/nsMsgDBView.cpp(...) : warning C4018: '...' : signed/unsigned mismatch|, and 3 in nsMsgThreadedDBView.cpp
Reporter | ||
Comment 2•15 years ago
|
||
Attachment #373476 -
Flags: superreview?(bienvenu)
Attachment #373476 -
Flags: review?(bienvenu)
Comment 3•15 years ago
|
||
Comment on attachment 373476 [details] [diff] [review] (Av1) <nsMsgThreadedDBView.cpp> 1 s/PRInt32/PRUint32/ [Checkin: Comment 4] thx for the patch.
Attachment #373476 -
Flags: superreview?(bienvenu)
Attachment #373476 -
Flags: superreview+
Attachment #373476 -
Flags: review?(bienvenu)
Attachment #373476 -
Flags: review+
Reporter | ||
Updated•15 years ago
|
Attachment #373476 -
Attachment description: (Av1) <nsMsgThreadedDBView.cpp> 1 s/PRInt32/PRUint32/ → (Av1) <nsMsgThreadedDBView.cpp> 1 s/PRInt32/PRUint32/
[Checkin: Comment 4]
Reporter | ||
Comment 4•15 years ago
|
||
Comment on attachment 373476 [details] [diff] [review] (Av1) <nsMsgThreadedDBView.cpp> 1 s/PRInt32/PRUint32/ [Checkin: Comment 4] http://hg.mozilla.org/comm-central/rev/f7644274b7ac
Reporter | ||
Updated•15 years ago
|
Flags: wanted-thunderbird3?
Reporter | ||
Comment 5•15 years ago
|
||
(In reply to comment #0) > How (= which way) do you want this fixed? David?
Reporter | ||
Updated•14 years ago
|
Comment 6•14 years ago
|
||
I'd cast GetSize() to (PRUint32) or (nsMsgViewIndex)
How hard is it to finish this? What needs to be done? Just changing the return type?
Comment 8•13 years ago
|
||
per https://bugzilla.mozilla.org/show_bug.cgi?id=488982#c6 cast the return value of GetSize() calls...
Do you mean casting the returned value in all the callers? Not redefine the return type of the function?
Comment 10•13 years ago
|
||
(In reply to :aceman from comment #9) > Do you mean casting the returned value in all the callers? yes, but only the callers where a warning is generated.
Comment 11•13 years ago
|
||
Ok, thanks. Then it is something I can't currently do.
Comment 12•12 years ago
|
||
Serge, do you still see any of these warnings? My gcc does not emit any of this type for this file.
Comment 13•10 years ago
|
||
I still get the following C4018 warnings in mailnews/base/src:
> mailnews\base\search\src\nsMsgSearchSession.cpp:124 [C4018] '<=' : signed/unsigned mismatch
> mailnews\base\src\nsMsgDBView.cpp:5508 [C4018] '<' : signed/unsigned mismatch
There are more C4018 warnings in mailnews but I'm not sure if they belong here or in another bug.
Comment 14•7 years ago
|
||
Hello, I would like to help on this issue.
Comment 16•7 years ago
|
||
Are warnings still reported? I thought all warnings were fixed when warnings-as-errors was enabled.
Comment 17•7 years ago
|
||
Hello, I have recompiled code yesterday and i can confirm that there are no warnings at compilation time (Compiler: Visual Studio 2015 update 3 compiler) for both files that are in the subject of this issue. Could somebody double check please ? Thanks,
Comment 18•7 years ago
|
||
Hello, I can confirm that with the latest code in comm-central, i can not reproduce the warnings. Thanks,
Comment 19•7 years ago
|
||
(In reply to Stefan Sitter from comment #16) > Are warnings still reported? I thought all warnings were fixed when > warnings-as-errors was enabled. Yes, most warnings should be cleaned up already.
Flags: needinfo?(acelists)
Comment 20•7 years ago
|
||
The reported line numbers are already outdated. Let's close this until somebody sees the warnings again. Amd one case was already fixed with a patch in this bug.
Assignee: jeanluc.bonnafoux → nobody
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•