Closed
Bug 1167834
Opened 9 years ago
Closed 9 years ago
widget/cocoa/nsCocoaDebugUtils.mm:151:21 [-Wwritable-strings] ISO C++11 does not allow conversion from string literal to 'char *'
Categories
(Core :: Widget: Cocoa, defect)
Core
Widget: Cocoa
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox39 | --- | unaffected |
firefox40 | --- | wontfix |
firefox41 | --- | fixed |
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.99 KB,
patch
|
smichaud
:
review+
|
Details | Diff | Splinter Review |
clang warns about assigning string constant "unknown" to a non-const char pointer: widget/cocoa/nsCocoaDebugUtils.mm:151:21 [-Wwritable-strings] ISO C++11 does not allow conversion from string literal to 'char *' widget/cocoa/nsCocoaDebugUtils.mm:152:25 [-Wwritable-strings] ISO C++11 does not allow conversion from string literal to 'char *' However, these string pointers can't be made const because (C++'s but not C's!) free() requires a non-const pointer parameter. This patch removes the stringsNeedRelease flag and saves the malloc'd strings, if any, in dedicated non-const pointers.
Attachment #8609718 -
Flags: review?(spohl.mozilla.bugs)
Comment 1•9 years ago
|
||
Comment on attachment 8609718 [details] [diff] [review] Wwritable-strings_nsCocoaDebugUtils.patch Forwarding review request to get faster turnaround on this during my PTO.
Attachment #8609718 -
Flags: review?(spohl.mozilla.bugs) → review?(smichaud)
Comment 2•9 years ago
|
||
Comment on attachment 8609718 [details] [diff] [review] Wwritable-strings_nsCocoaDebugUtils.patch Looks fine to me. Thanks for the fix.
Attachment #8609718 -
Flags: review?(smichaud) → review+
Assignee | ||
Comment 4•9 years ago
|
||
Thanks!
https://hg.mozilla.org/mozilla-central/rev/c7b2ecf508e6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•