Closed Bug 794023 Opened 12 years ago Closed 12 years ago

NECKO_UNKNOWN_APP should use std::numeric_limits

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: mounir, Assigned: jduell.mcbugs)

References

Details

Attachments

(2 obsolete files)

Attached patch Patch (obsolete) (deleted) — Splinter Review
Using 4294967295 will warn and the netwerk/ seems to be warning-free (so it's failing the build). I have no idea why we should still use PR_UINT32_MAX when we cas simply use std::numeric_limits<uint32_t>::max(). Which in addition of being readable, doesn't warn. Jason, could you review the fix and ehsan, could you confirm that it might be better to switch PR_UINT32_MAX to numeric_limits?
Attachment #664428 - Flags: review?(jduell.mcbugs)
Attachment #664428 - Flags: feedback?(ehsan)
Comment on attachment 664428 [details] [diff] [review] Patch Yes please!
Attachment #664428 - Flags: feedback?(ehsan) → feedback+
Comment on attachment 664428 [details] [diff] [review] Patch Review of attachment 664428 [details] [diff] [review]: ----------------------------------------------------------------- This was just copied and pasted from caps/idl/nsIScriptSecurityManager.idl's "const unsigned long UNKNOWN_APP_ID = 4294967295;", so you should open a bug to fix that site too.
Attachment #664428 - Flags: review?(jduell.mcbugs) → review+
NSPR doesn't use C++ and therefore can't use numeric_limits In bug 756648 comment 31 I did ask that this file does not use this literal, I'm annoyed that my review comment was ignored. Anyway you should now remove the comment about PR_UINT32_MAX, that is obvious now that the file uses numeric_limits
Attached patch v2: uncomments uses of NECKO_UNKNOWN_APP, too (obsolete) (deleted) — Splinter Review
This just also uncomments the uses of NECKO_UNKNOWN_APP. Applies on top of my patch for bug 786299. Delegating review to mounir...
Assignee: mounir → jduell.mcbugs
Attachment #664428 - Attachment is obsolete: true
Attachment #665764 - Flags: review?(mounir)
Depends on: 786299
Flags: in-testsuite-
Summary: NECKO_UNKNOWN_APP_ID should use std::numeric_limits → NECKO_UNKNOWN_APP should use std::numeric_limits
Target Milestone: --- → mozilla18
Comment on attachment 665764 [details] [diff] [review] v2: uncomments uses of NECKO_UNKNOWN_APP, too I pushed the obsoleted patch and uncommented something I commented yesterday to fix a build bustage. I haven't found the other line you uncommented Jason so I believe this is in your patch queue.
Attachment #665764 - Flags: review?(mounir)
Comment on attachment 665764 [details] [diff] [review] v2: uncomments uses of NECKO_UNKNOWN_APP, too OK, no worries--code will go in a different bug.
Attachment #665764 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 796164
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: