String literals are |const char*| - avoid casting them to |char*|.
Trying to assign a string literal to a |char*| pointer results in the following compilation error: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings] This CL: *) Avoids (char*)"string literal" casts *) Changes the type of corresponding fields from |char*| to |const char*| Bug: 1080832 Change-Id: Ie92eed766acec232a9e6b971f5f5d5569914dba3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2287911 Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Josh Karlin <jkarlin@chromium.org> Reviewed-by:Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#786350}
Showing
Please register or sign in to comment