Closed
Bug 1258269
Opened 9 years ago
Closed 9 years ago
exception_handler.cc:535:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
Categories
(Toolkit :: Crash Reporting, defect)
Toolkit
Crash Reporting
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file)
Build warning on linux debug (with clang 3.8):
{
In file included from Unified_cpp_src_client_linux0.cpp:38:
Warning: -Wwritable-strings in $SRC/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc: ISO C++11 does not allow conversion from string literal to 'char *'
$SRC/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc:535:23: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *clonedMsg = "ExceptionHandler::GenerateDump cloned child ";
^
Warning: -Wwritable-strings in $SRC/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc: ISO C++11 does not allow conversion from string literal to 'char *'
$SRC/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc:545:22: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
char *childMsg = "ExceptionHandler::GenerateDump I'm the child\n";
^
}
These string literals (which we added in bug 1247399) need to be declared as const to make the warning go away.
But really, they probably want to be...
static const char variableName[] = "whatever";
...for consistency with the rest of the file.
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/41269/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/41269/
Attachment #8732710 -
Flags: review?(ted)
Comment 2•9 years ago
|
||
Comment on attachment 8732710 [details]
MozReview Request: Bug 1258269: Declare logging string-literals in exception_handler.cc as 'const char[]' to fix build warning & for consistency. r?ted
https://reviewboard.mozilla.org/r/41269/#review37847
These could probably be removed, honestly, since I think snorp figured out the root cause. It doesn't matter much either way.
Attachment #8732710 -
Flags: review?(ted) → review+
Comment 4•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•