Closed Bug 14665 Opened 21 years ago Closed 17 years ago

unreachable code in mailnews/compose/src/nsMsgSendPart.cpp

Categories

(MailNews Core :: Composition, defect, P3, minor)

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.2alpha

People

(Reporter: colin, Assigned: bugzilla)

Details

(Whiteboard: code clean-up)

Attachments

(1 file)

In mailnews/compose/src/nsMsgSendPart.cpp there is the code segment:

      NS_ASSERTION(MIME_BUFFER_SIZE > 1000, "buffer size out of range");

My compiler grumbles because this is always true and therefore the test
is not needed (MIME_BUFFER_SIZE is a #define'd to 4096). Intead of a run
time check, wouldn't a compile time check be more appropriate? Something
like:

#if MIME_BUFFER_SIZE < 1000
#error MIME_BUFFER_SIZE must be at least 1000
#endif

Colin.
Status: NEW → ASSIGNED
Target Milestone: M14
Thanks Collin.
Target Milestone: M14 → M16
Not M16 stopper.  Marking M17.
Target Milestone: M16 → M17
moving to future.
Target Milestone: M17 → Future
Accepting
Whiteboard: code clean-up
Target Milestone: Future → mozilla0.9.6
moving to 1.0
Target Milestone: mozilla0.9.6 → mozilla1.0
Target Milestone: mozilla1.0 → mozilla1.2
QA Contact: lchiang → stephend
Attached patch patchSplinter Review
heres a patch that just removes the assertion and adds a comment by the define
Attachment #121886 - Flags: superreview?(dmose)
Attachment #121886 - Flags: review?(ducarroz)
Comment on attachment 121886 [details] [diff] [review]
patch

sr=dmose
Attachment #121886 - Flags: superreview?(dmose) → superreview+
Comment on attachment 121886 [details] [diff] [review]
patch

r=kaie
Attachment #121886 - Flags: review?(ducarroz) → review+
Comment on attachment 121886 [details] [diff] [review]
patch

this is a super trivial patch.
Attachment #121886 - Flags: approval1.4b?
Comment on attachment 121886 [details] [diff] [review]
patch

a=sspitzer

stuart, hacking mailnews, april 2003?
Attachment #121886 - Flags: approval1.4b? → approval1.4b+
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Verified via code inspection (using LXR).
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.