RESOLVED FIXED247890
[CMake] No need to build with -Wwrite-strings
https://bugs.webkit.org/show_bug.cgi?id=247890
Summary [CMake] No need to build with -Wwrite-strings
Michael Catanzaro
Reported 2022-11-14 05:16:10 PST
The -Wwrite-strings warning is enabled by default for C++ code, and its benefit in C code is not really so amazing as to justify its use considering how few C source files we have, so specifying it manually is not very useful. From gcc(1): -Wwrite-strings When compiling C, give string constants the type "const char[length]" so that copying the address of one into a non-"const" "char *" pointer produces a warning. These warnings help you find at compile time code that can try to write into a string constant, but only if you have been very careful about using "const" in declarations and prototypes. Otherwise, it is just a nuisance. This is why we did not make -Wall request these warnings. When compiling C++, warn about the deprecated conversion from string literals to "char *". This warning is enabled by default for C++ programs.
Attachments
Michael Catanzaro
Comment 1 2022-11-14 05:34:21 PST
EWS
Comment 2 2022-11-14 14:43:35 PST
Committed 256674@main (0ce633e16f78): <https://commits.webkit.org/256674@main> Reviewed commits have been landed. Closing PR #6471 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.