Closed
Bug 989676
Opened 11 years ago
Closed 11 years ago
nsCookieService.h:75:15: error: 'const' qualifier on reference type 'KeyType' (aka 'const nsCookieKey &') has no effect [-Werror,-Wignored-qualifiers]
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
u408661
:
review+
|
Details | Diff | Splinter Review |
Build warning in clang 3.5 (treated as an error in builds with --enable-warnings-as-errors): { netwerk/cookie/nsCookieService.h:75:15: error: 'const' qualifier on reference type 'KeyType' (aka 'const nsCookieKey &') has no effect [-Werror,-Wignored-qualifiers] } Code snippet: 57 typedef const nsCookieKey& KeyType; 58 typedef const nsCookieKey* KeyTypePointer; [...] 69 nsCookieKey(const KeyTypePointer other) [...] 75 nsCookieKey(const KeyType other) http://mxr.mozilla.org/mozilla-central/source/netwerk/cookie/nsCookieService.h#57 The "const" in the constructor signatures there is redundant.
Assignee | ||
Updated•11 years ago
|
Blocks: buildwarning
Assignee | ||
Comment 1•11 years ago
|
||
(Looks like this code was added in http://hg.mozilla.org/mozilla-central/rev/156bdf05dd97#l9.15 for bug 756648)
Depends on: 756648
Assignee | ||
Comment 2•11 years ago
|
||
Attached patch drops the redundant 'const' qualifiers. (I'm actually not 100% sure whether the 'const' is technically redundant in the "const KeyTypePointer" one -- I didn't get a build warning for that one, at least. So I think the const qualifier there is making the *pointer* const, which isn't really useful anyway in this context (it's not protecting anything), so no harm in removing it for consistency.)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8399040 -
Flags: review?(jduell.mcbugs)
Assignee | ||
Comment 3•11 years ago
|
||
(Patch has extra-large context to include the typedefs at the top, to demonstrate that the typedefs already include 'const' labels.)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8399040 [details] [diff] [review] fix v1: drop redundant 'const' qualifiers Actually, looks like Jason might be out this week. Tagging hurley instead.
Attachment #8399040 -
Flags: review?(jduell.mcbugs) → review?(hurley)
Comment on attachment 8399040 [details] [diff] [review] fix v1: drop redundant 'const' qualifiers Review of attachment 8399040 [details] [diff] [review]: ----------------------------------------------------------------- const const const
Attachment #8399040 -
Flags: review?(hurley) → review+
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2d191e24dbf
Flags: in-testsuite-
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f2d191e24dbf
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•