Closed Bug 361792 Opened 19 years ago Closed 19 years ago

Signed-unsigned comparison in nsVoidArray.cpp

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: Waldo, Assigned: Waldo)

References

()

Details

Attachments

(1 file)

The comparison (see URL; make sure to scroll down half a screen to the actual comparison) is entirely safe, but gcc doesn't know that. The fix is to cast the signed operand to unsigned to fix the warning gcc emits.
Attached patch PatchSplinter Review
Note that this is a one-line fix; the patch size is due to adding context to show that the cast is safe.
Attachment #246510 - Flags: superreview?(darin.moz)
Attachment #246510 - Flags: review?(darin.moz)
Attachment #246510 - Flags: superreview?(darin.moz)
Attachment #246510 - Flags: superreview+
Attachment #246510 - Flags: review?(darin.moz)
Attachment #246510 - Flags: review+
Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: