summaryrefslogtreecommitdiffstats
path: root/rlz
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 22:04:53 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 22:04:53 +0000
commit900634e0e697f152b54c2783cc1d6f325695caf5 (patch)
tree80e2d12223175bfdd16c53398497647b9f827bfb /rlz
parentc8680d6ef7d3dd49752859cc95a1867214135bd7 (diff)
downloadchromium_src-900634e0e697f152b54c2783cc1d6f325695caf5.zip
chromium_src-900634e0e697f152b54c2783cc1d6f325695caf5.tar.gz
chromium_src-900634e0e697f152b54c2783cc1d6f325695caf5.tar.bz2
clang/win: Fix most -Wwriteable-strings warnings.
Many win32 APIs take non-const string pointers. I checked that MSDN documents them as _In_ and says that they are inputs, and then added const_cast<>s at the calling sites. (In one test, I introduced a helper struct so that there can be fewer casts.) This wasn't just busywork, I found one function that we were handing string literals where the documentation explicitly said that that's not valid (filed http://crbug.com/396705). I didn't change the DECLARE_REGISTRY_APPID_RESOURCEID() call in cloud_print; it sounds like that'll fix itself when we update to the 2014 sdk: http://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindrances-to-adopting-new-strictstrings-conformance-option-in-vs2013 BUG=396705,82385 R=rnk@chromium.org, rsleevi@chromium.org, sergeyu@chromium.org, vitalybuka@chromium.org Review URL: https://codereview.chromium.org/413763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz')
-rw-r--r--rlz/win/lib/rlz_lib_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/rlz/win/lib/rlz_lib_win.cc b/rlz/win/lib/rlz_lib_win.cc
index c765560..1249fc3 100644
--- a/rlz/win/lib/rlz_lib_win.cc
+++ b/rlz/win/lib/rlz_lib_win.cc
@@ -153,7 +153,7 @@ bool CreateMachineState() {
ea.grfAccessMode = GRANT_ACCESS;
ea.grfInheritance= SUB_CONTAINERS_AND_OBJECTS_INHERIT;
ea.Trustee.TrusteeForm = TRUSTEE_IS_NAME;
- ea.Trustee.ptstrName = L"Everyone";
+ ea.Trustee.ptstrName = const_cast<wchar_t*>(L"Everyone");
ACL* new_dacl = NULL;
result = SetEntriesInAcl(1, &ea, dacl, &new_dacl);