Closed Bug 470574 Opened 17 years ago Closed 17 years ago

Warnings in nsCaret.cpp

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smontagu, Assigned: smontagu)

References

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
From Bug 418513 comment 35: This introduced a new warning: layout/base/nsCaret.h:311: 'nsCaret::mLastHint' will be initialized after layout/base/nsCaret.h:295: 'PRPackedBool nsCaret::mIgnoreUserModify' layout/base/nsCaret.cpp:89: when initialized here I get another new warning: layout/base/nsCaret.h:301: 'nsCaret::mLastBidiLevel' will be initialized after layout/base/nsCaret.h:298: 'PRPackedBool nsCaret::mKeyboardRTL' layout/base/nsCaret.cpp:89: when initialized here and an old one: layout/base/nsCaret.cpp: In function 'PRBool DrawCJKCaret(nsIFrame*, PRInt32)': layout/base/nsCaret.cpp:180: comparison between signed and unsigned integer expressions. The attached patch fixes all of them.
Attachment #353986 - Flags: superreview?(roc)
Attachment #353986 - Flags: review?(roc)
Blocks: 418513
Attachment #353986 - Flags: superreview?(roc)
Attachment #353986 - Flags: superreview?(dbaron)
Attachment #353986 - Flags: review?(roc)
Attachment #353986 - Flags: review?(dbaron)
Comment on attachment 353986 [details] [diff] [review] Patch ...roc is away
Comment on attachment 353986 [details] [diff] [review] Patch r+sr=dbaron, although: 1. if you care about the possibility that the fragment's length is in [2^31,2^32), you might want to cast aOffset to PRUint32 instead. (You've already checked it's >= 0, so that's fine.) 2. In C++, I'd slightly prefer a construction-style cast, i.e., PRInt32(aOffset) rather than (PRInt32)aOffset.
Attachment #353986 - Flags: superreview?(dbaron)
Attachment #353986 - Flags: superreview+
Attachment #353986 - Flags: review?(dbaron)
Attachment #353986 - Flags: review+
Forgot to mark this fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: