Closed Bug 209335 Opened 17 years ago Closed 13 years ago

fix warning in +mailnews/base/src/nsMsgFolderCompactor.cpp:557

Categories

(MailNews Core :: Backend, defect)

x86
All
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

Details

+mailnews/base/src/nsMsgFolderCompactor.cpp:557
+ `PRUint32 writeCount' might be used uninitialized in this function
Blocks: 59652, 59673
OS: Windows 2000 → All
Product: MailNews → Core
When looking at this code, it seems to me that writeCount can't really be used
uninitialized (else the assertion will fail). But I don't think it would hurt us
that much to initialize the variables at the beginning of the while-loop as this
shouldn't be a really big performance problem, and it would safe us from
possible mistakes made in future. Also, why don't we move the variables inside
the while? For me, that would work the same, but it looks cleaner to me.
writeCount gets initialized with 0 in http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/base/src/nsMsgFolderCompactor.cpp&rev=1.78#647

This line was introduced by the patch for bug 114656, so this bug can be resolved fix.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.