Closed
Bug 4963
Opened 26 years ago
Closed 25 years ago
signed vs. unsigned problems in mailnews code
Categories
(MailNews Core :: Database, defect, P3)
MailNews Core
Database
Tracking
(Not tracked)
VERIFIED
INVALID
M9
People
(Reporter: bruce, Assigned: sspitzer)
Details
A current build and pull from April 11 on linux, using egcs. This is almost all
of the warnings about unsigned vs signed problems from the mailnews code. I
didn't want to break this up into several reports yet, but give someone a chance
to hit the larger issues, and in a week or two, start filing against individual
files.
../../../../../mailnews/db/mork/src/morkArray.cpp: In method `void *
morkArray::SafeAt(class morkEnv *, mork_pos)':
../../../../../mailnews/db/mork/src/morkArray.cpp:196: warning: comparison
between signed and unsigned
../../../../../mailnews/db/mork/src/morkArray.cpp: In method `void
morkArray::SafeAtPut(class morkEnv *, mork_pos, void *)':
../../../../../mailnews/db/mork/src/morkArray.cpp:212: warning: comparison
between signed and unsigned
../../../../../mailnews/db/mork/src/morkArray.cpp: In method `void
morkArray::CutSlot(class morkEnv *, mork_pos)':
../../../../../mailnews/db/mork/src/morkArray.cpp:273: warning: comparison
between signed and unsigned
these were because mork_pos is signed, and the value it being compared with is
unsigned. This makes for interesting things. How do you access slots that are
beyond the range of an signed value?
../../../../../mailnews/db/mork/src/morkDeque.cpp: In method `class morkLink *
morkDeque::At(mork_pos) const':
../../../../../mailnews/db/mork/src/morkDeque.cpp:76: warning: comparison
between signed and unsigned
here, a mork_num vs mork_pos...
../../../../../mailnews/db/mork/src/morkRow.cpp: In method `void
morkRow::CutColumn(class morkEnv *, mdb_column)':
../../../../../mailnews/db/mork/src/morkRow.cpp:535: warning: comparison between
signed and unsigned
../../../../../mailnews/db/mork/src/morkTable.cpp: In method `mork_pos
morkTable::ArrayHasOid(class morkEnv *, const struct mdbOid *)':
../../../../../mailnews/db/mork/src/morkTable.cpp:268: warning: comparison
between signed and unsigned
../../../../../mailnews/db/mork/src/morkTableRowCursor.cpp: In method `class
morkRow * morkTableRowCursor::NextRow(class morkEnv *, struct mdbOid *, mdb_pos
*)':
../../../../../mailnews/db/mork/src/morkTableRowCursor.cpp:175: warning:
comparison between signed and unsigned
../../../../../mailnews/db/msgdb/src/nsMsgDatabase.cpp: In method `nsresult
nsMsgDatabase::ListAllKeys(class nsMsgKeyArray &)':
../../../../../mailnews/db/msgdb/src/nsMsgDatabase.cpp:1638: warning: comparison
between signed and unsigned
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp: In method `void
nsMsgHdr::Init()':
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp:46: warning: assignment of
negative value `-1' to `PRUint32'
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp: In method `nsresult
nsMsgHdr::SetRecipientsArray(const char *, const char *, PRUint32)':
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp:318: warning: comparison
between signed and unsigned
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp: In method `nsresult
nsMsgHdr::SetCCListArray(const char *, const char *, PRUint32)':
../../../../../mailnews/db/msgdb/src/nsMsgHdr.cpp:360: warning: comparison
between signed and unsigned
../../../../../mailnews/db/msgdb/src/nsMailDatabase.cpp: In method `nsresult
nsMailDatabase::Open(class nsFileSpec &, PRBool, class nsIMsgDatabase **, PRBool
= 0)':
../../../../../mailnews/db/msgdb/src/nsMailDatabase.cpp:117: warning: comparison
between signed and unsigned
../../../../../mailnews/db/msgdb/src/nsMailDatabase.cpp:125: warning: comparison
between signed and unsigned
../../../../mailnews/news/src/nsNNTPHost.cpp: In method `nsresult
nsNNTPHost::SetNewsRCFilename(char *)':
../../../../mailnews/news/src/nsNNTPHost.cpp:1041: warning: return of negative
value `-207' to `nsresult'
../../../../mailnews/news/src/nsNNTPHost.cpp:1045: warning: return of negative
value `-207' to `nsresult'
../../../../mailnews/news/src/nsNNTPHost.cpp: In function `static PRInt32
nsNNTPHost::InhaleLine(char *, PRUint32, void *)':
../../../../mailnews/news/src/nsNNTPHost.cpp:1517: warning: comparison between
signed and unsigned
../../../../mailnews/news/src/nsNNTPHost.cpp: In method `const char *
nsNNTPHost::GetDBDirName()':
../../../../mailnews/news/src/nsNNTPHost.cpp:1951: warning: comparison between
signed and unsigned
../../../../mailnews/news/src/nsNNTPHost.cpp: In method `nsresult
nsNNTPHost::SetPrettyName(const char *, const char *)':
../../../../mailnews/news/src/nsNNTPHost.cpp:2346: warning: return of negative
value `-207' to `nsresult'
../../../../mailnews/news/src/nsNNTPHost.cpp: In method `nsresult
nsNNTPHost::SetGroupNeedsExtraInfo(const char *, PRBool)':
../../../../mailnews/news/src/nsNNTPHost.cpp:2462: warning: return of negative
value `-207' to `nsresult'
../../../../mailnews/news/src/nsNNTPHost.cpp: In method `class nsMsgGroupRecord
* nsNNTPHost::FindOrCreateGroup(const char *, int * = 0)':
../../../../mailnews/news/src/nsNNTPHost.cpp:2783: warning: comparison between
signed and unsigned
../../../../mailnews/local/src/nsMailboxProtocol.cpp: In method `PRInt32
nsMailboxProtocol::ReadMessageResponse(class nsIInputStream *, PRUint32)':
../../../../mailnews/local/src/nsMailboxProtocol.cpp:502: warning: comparison
between signed and unsigned
../../../../mailnews/local/src/nsMailboxUrl.cpp: In method `nsresult
nsMailboxUrl::GetHostPort(PRUint32 *) const':
../../../../mailnews/local/src/nsMailboxUrl.cpp:695: warning: assignment of
negative value `-1' to `unsigned int'
../../../../mailnews/compose/src/nsMsgCompFields.cpp: In method `PRInt16
nsMsgCompFields::DecodeHeader(MSG_HEADER_SET)':
../../../../mailnews/compose/src/nsMsgCompFields.cpp:613: warning: comparison
between signed and unsigned
../../../../mailnews/compose/src/nsMsgCompose.cpp: In method `PRInt32
QuotePlainIntoHTML::QuoteLine(char *, PRUint32)':
../../../../mailnews/compose/src/nsMsgCompose.cpp:1612: warning: comparison
between signed and unsigned
../../../../mailnews/compose/src/nsMsgCompose.cpp: In method `nsresult
nsMsgCompose::QuoteMessage(int (*)(void *, const char *), void *)':
../../../../mailnews/compose/src/nsMsgCompose.cpp:1659: warning: return of
negative value `-207' to `nsresult'
../../../../mailnews/compose/src/nsMsgCompose.cpp:1722: warning: return of
negative value `-207' to `nsresult'
../../../../mailnews/compose/src/nsMsgCompose.cpp: In method `int
nsMsgCompose::RetrieveStandardHeaders(struct MSG_HeaderEntry **)':
../../../../mailnews/compose/src/nsMsgCompose.cpp:3583: warning: comparison
between signed and unsigned
../../../../mailnews/compose/src/nsMsgCompose.cpp: In method `void
nsMsgCompose::ClearComposeHeaders()':
../../../../mailnews/compose/src/nsMsgCompose.cpp:3609: warning: comparison
between signed and unsigned
../../../../mailnews/compose/src/nsMsgCompose.cpp: In method `int
nsMsgCompose::MungeThroughRecipients(PRBool *, PRBool *)':
../../../../mailnews/compose/src/nsMsgCompose.cpp:4006: warning: comparison
between signed and unsigned
../../../../mailnews/compose/src/nsMsgSend.cpp: In function `PRInt32
msg_do_fcc_handle_line(char *, PRUint32, void *)':
../../../../mailnews/compose/src/nsMsgSend.cpp:5659: warning: comparison between
signed and unsigned
../../../../mailnews/mime/src/plugin_inst.cpp: In method `nsresult
MimePluginInstance::Write(const char *, PRUint32, PRUint32 *)':
../../../../mailnews/mime/src/plugin_inst.cpp:378: warning: return of negative
value `-1' to `nsresult'
../../../../mailnews/mime/src/mimeenc.cpp: In function `int
MimeDecoderDestroy(struct MimeDecoderData *, PRBool)':
../../../../mailnews/mime/src/mimeenc.cpp:537: warning: comparison between
signed and unsigned
../../../../mailnews/mime/src/mimebuf.cpp: In function `int
mime_GrowBuffer(PRUint32, PRUint32, PRUint32, char **, PRInt32
*)':../../../../mailnews/mime/src/mimebuf.cpp:31: warning: comparison between
signed and unsigned../../../../mailnews/mime/src/mimebuf.cpp: In function `int
mime_ReBuffer(const char *, PRInt32, PRUint32, char **, PRInt32 *, PRUint32 *,
PRInt32 (*)(char *, PRUint32, void *), void *)':
../../../../mailnews/mime/src/mimebuf.cpp:67: warning: comparison between signed
and unsigned../../../../mailnews/mime/src/mimebuf.cpp: In function `int
mime_LineBuffer(const char *, PRInt32, char **, PRInt32 *, PRUint32 *, PRBool,
PRInt32 (*)(char *, PRUint32, void *), void *)':
../../../../mailnews/mime/src/mimebuf.cpp:162: warning: comparison between
signed and unsigned
../../../../mailnews/mime/src/mimebuf.cpp:163: warning: comparison between
signed and unsigned
../../../../mailnews/mime/src/mimebuf.cpp:212: warning: comparison between
signed and unsigned
I work on the Mork items soon; then I'll hit other parts of mailnews.
I am now fixing all warnings about comparing signed and unsigned
in my execution harness build. But I need an open tree to check in.
Reporter | ||
Comment 3•25 years ago
|
||
tree is open for another 8 hours!!
Hmm, it is open right now. But I've made an awful lot of changes, since
I also quelled all the unused variable warnings. If I check in them in
right now, I'd be on the hook for a while to make sure nothing happens to
builds on other platforms. I'd be willing to do this for bug fixes, but
I'm not sure it's worth it to suppress warnings, especially since if I
make any mistake it will seriously annoy folks at this point in time.
Updated•25 years ago
|
Target Milestone: M6
Comment 5•25 years ago
|
||
M6. David, you can get help from others to fix their code if you want.
The warnings in the Mork directory should be fixed, after David B checked
in my changes when the tree opened to get the new FindRow() method. I
can fix the other warnings sometime in the future when I sync my tree with
the tip (which is something I do rarely, like every couple weeks, rather
than every day).
Cc Seth (sspitzer) in case he wishes to steal the bug from me before I
manage to wrap it up.
The warnings in the Mork directory should be fixed, after David B checked
in my changes when the tree opened to get the new FindRow() method. I
can fix the other warnings sometime in the future when I sync my tree with
the tip (which is something I do rarely, like every couple weeks, rather
than every day).
Cc Seth (sspitzer) in case he wishes to steal the bug from me before I
manage to wrap it up.
Assignee | ||
Updated•25 years ago
|
Assignee: davidmc → sspitzer
Status: ASSIGNED → NEW
Assignee | ||
Comment 8•25 years ago
|
||
I'll steal this bug from davidmc and work on resolving these warnings.
Summary: signed vs. unsigned problems in mailnews code → [PP]signed vs. unsigned problems in mailnews code
Comment 10•25 years ago
|
||
These problems exist on all platforms, Linux is the only one smart enough to
complain about it (well, Mac might complain as well) I don't think this is a PP
issue.
Assignee | ||
Updated•25 years ago
|
Summary: [PP]signed vs. unsigned problems in mailnews code → signed vs. unsigned problems in mailnews code
Assignee | ||
Comment 11•25 years ago
|
||
alecf is right, this is not a PP issue.
removing [PP] from the summary.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M6 → M8
Assignee | ||
Comment 12•25 years ago
|
||
sadly, I haven't gotten to all the warnings yet. but I'm slowly getting to
them. moving to m8.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•25 years ago
|
||
accepting bug.
when I get to it, I'll break these warnings out and assign them to the rightful
owners.
Updated•25 years ago
|
Target Milestone: M8 → M9
Comment 14•25 years ago
|
||
moving to m9. I think many of these have been fixed, however.
Comment 15•25 years ago
|
||
Since this is not a platform parity issue, changing platform to All (from
PC/Linux)
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 16•25 years ago
|
||
a lot of these have been fixed over the past few weeks. there are still
warnings.
going to mark this fixed, since we have
http://tinderbox.mozilla.org/SeaMonkey/warnings.html to keep track of warnings
now.
Comment 17•25 years ago
|
||
According to Seth, there are still unsigned vs. signed warnings. They will be
addressed but are of low priority.
I am going to REOPEN this bug so that it will eventually get fixed.
Assignee | ||
Comment 18•25 years ago
|
||
we aren't having bugs about warnings. see my previous comment about
http://tinderbox.mozilla.org/SeaMonkey/warnings.html
that either makes this invalid, or won't fix.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → INVALID
Comment 19•25 years ago
|
||
Changing to INVALID
Comment 20•25 years ago
|
||
VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•