Closed
Bug 361791
Opened 18 years ago
Closed 17 years ago
Unnecessary signed-unsigned casts, warnings in xpidl_util.c
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha3
People
(Reporter: Waldo, Assigned: Waldo)
References
()
Details
Attachments
(1 file)
1.69 KB,
patch
|
timeless
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Portions of UUIDs are being sscanf'd as unsigned numbers but are being stuffed into signed ones for no reason. This also necessitated some casting when those signed numbers were stuffed into the unsigned fields of an nsID, again for no good reason. The to-be-posted patch makes the values into which numbers are stuffed unsigned to ease compiler warnings. We could go even further and make n1 and n2 PRUint16 and n3[8] PRUint8, but then we'd have to use different format specifiers, which is non-trivial without C99's SCNx32, SCNx16, and SCNx8 macros (or requires using PR_sscanf, but I can't find docs on the NSPR integer format specifiers, other than that there's an unspecified mapping between sscanf and PR_sscanf specifiers).
Assignee | ||
Comment 1•18 years ago
|
||
Attachment #246509 -
Flags: superreview?(shaver)
Attachment #246509 -
Flags: review?(shaver)
Assignee | ||
Comment 2•18 years ago
|
||
(In reply to comment #0) > PR_sscanf So as it turns out, I was blind and missed the specifier docs, but it's irrelevant because xpidl explicitly doesn't depend on NSPR and thus isn't usable.
Status: NEW → ASSIGNED
Assignee | ||
Updated•17 years ago
|
Attachment #246509 -
Flags: superreview?(shaver)
Attachment #246509 -
Flags: superreview?(darin.moz)
Attachment #246509 -
Flags: review?(timeless)
Attachment #246509 -
Flags: review?(shaver)
Updated•17 years ago
|
Attachment #246509 -
Flags: superreview?(darin.moz) → superreview+
Attachment #246509 -
Flags: review?(timeless) → review+
Assignee | ||
Comment 3•17 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: mozilla1.9alpha1 → mozilla1.9alpha3
You need to log in
before you can comment on or make changes to this bug.
Description
•