Closed Bug 424528 Opened 18 years ago Closed 18 years ago

warning: ‘isReadInDB’ may be used uninitialized in nsMsgDatabase::MarkHdrRead

Categories

(MailNews Core :: Database, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: tuukka.tolvanen, Assigned: mkmelin)

Details

Attachments

(1 file, 1 obsolete file)

In member function ‘virtual nsresult nsMsgDatabase::MarkHdrRead(nsIMsgDBHdr*, PRBool, nsIDBChangeListener*)’: http://mxr.mozilla.org/mozilla/source/mailnews/db/msgdb/src/nsMsgDatabase.cpp#2333 warning: ‘isReadInDB’ may be used uninitialized in this function 2333 PRBool isReadInDB; 2335 nsMsgDatabase::IsHeaderRead(msgHdr, &isReadInDB); 2341 if (bRead != isRead || isRead != isReadInDB) http://mxr.mozilla.org/mozilla/source/mailnews/db/msgdb/src/nsMsgDatabase.cpp#1934 1934 nsresult nsMsgDatabase::IsHeaderRead(nsIMsgDBHdr *msgHdr, PRBool *pRead) 1935 { 1936 if (!msgHdr) 1937 return NS_MSG_MESSAGE_NOT_FOUND; of course if that were to happen things would probably only actually get interesting at 2345 msgHdr->GetMessageKey(&msgKey);
Attached patch proposed fix (obsolete) — Splinter Review
Assignee: bienvenu → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #312675 - Flags: superreview?(bienvenu)
Attachment #312675 - Flags: review?(bienvenu)
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9
a minor nit: that won't shut up the compiler warning, as the compiler still isn't actually seeing isReadInDB getting initialized in that compilation unit :)
Attached patch proposed fix, v2Splinter Review
Thanks Tuukka! Note to self: look at the compiler output when patching bugs about compiler warnings:)
Attachment #312675 - Attachment is obsolete: true
Attachment #312919 - Flags: superreview?(bienvenu)
Attachment #312919 - Flags: review?(bienvenu)
Attachment #312675 - Flags: superreview?(bienvenu)
Attachment #312675 - Flags: review?(bienvenu)
David: ping on the r/sr
Comment on attachment 312919 [details] [diff] [review] proposed fix, v2 thx, Magnus.
Attachment #312919 - Flags: superreview?(bienvenu)
Attachment #312919 - Flags: superreview+
Attachment #312919 - Flags: review?(bienvenu)
Attachment #312919 - Flags: review+
Checking in mailnews/db/msgdb/src/nsMsgDatabase.cpp; /cvsroot/mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp,v <-- nsMsgDatabase.cpp new revision: 1.396; previous revision: 1.395 done ->FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: