Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1822)

Unified Diff: sandbox/win/src/policy_low_level_unittest.cc

Issue 294753003: Fix clang -Wwritable-strings warnings in the Windows sandbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/policy_engine_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/policy_low_level_unittest.cc
diff --git a/sandbox/win/src/policy_low_level_unittest.cc b/sandbox/win/src/policy_low_level_unittest.cc
index 2b5d0f7a6ec952ca837d7f2378c1a31735e09156..c9424c6cf4fbde9d1a920caacd73f7fd4f7301ae 100644
--- a/sandbox/win/src/policy_low_level_unittest.cc
+++ b/sandbox/win/src/policy_low_level_unittest.cc
@@ -62,7 +62,7 @@ TEST(PolicyEngineTest, SimpleStrMatch) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = L"Z:\\Directory\\domo.txt";
+ const wchar_t* filename = L"Z:\\Directory\\domo.txt";
POLPARAMS_BEGIN(eval_params)
POLPARAM(filename) // Argument 0
@@ -95,7 +95,7 @@ TEST(PolicyEngineTest, SimpleIfNotStrMatch) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = NULL;
+ const wchar_t* filename = NULL;
POLPARAMS_BEGIN(eval_params)
POLPARAM(filename) // Argument 0
POLPARAMS_END;
@@ -133,7 +133,7 @@ TEST(PolicyEngineTest, SimpleIfNotStrMatchWild1) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = NULL;
+ const wchar_t* filename = NULL;
POLPARAMS_BEGIN(eval_params)
POLPARAM(filename) // Argument 0
POLPARAMS_END;
@@ -166,7 +166,7 @@ TEST(PolicyEngineTest, SimpleIfNotStrMatchWild2) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = NULL;
+ const wchar_t* filename = NULL;
POLPARAMS_BEGIN(eval_params)
POLPARAM(filename) // Argument 0
POLPARAMS_END;
@@ -205,7 +205,7 @@ TEST(PolicyEngineTest, IfNotStrMatchTwoRulesWild1) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = NULL;
+ const wchar_t* filename = NULL;
unsigned long access = 0;
POLPARAMS_BEGIN(eval_params)
POLPARAM(filename) // Argument 0
@@ -254,7 +254,7 @@ TEST(PolicyEngineTest, IfNotStrMatchTwoRulesWild2) {
EXPECT_TRUE(policyGen.AddRule(kFakeService, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = NULL;
+ const wchar_t* filename = NULL;
unsigned long access = 0;
unsigned long sharing = 66;
@@ -328,7 +328,7 @@ TEST(PolicyEngineTest, OneRuleTest) {
EXPECT_TRUE(policyGen.AddRule(kNtFakeCreateFile, &pr));
EXPECT_TRUE(policyGen.Done());
- wchar_t* filename = L"c:\\Documents and Settings\\Microsoft\\BLAH.txt";
+ const wchar_t* filename = L"c:\\Documents and Settings\\Microsoft\\BLAH.txt";
unsigned long creation_mode = OPEN_EXISTING;
unsigned long flags = FILE_ATTRIBUTE_NORMAL;
void* security_descriptor = NULL;
@@ -484,7 +484,7 @@ TEST(PolicyEngineTest, ThreeRulesTest) {
// Test the policy evaluation.
- wchar_t* filename = L"";
+ const wchar_t* filename = L"";
unsigned long creation_mode = OPEN_EXISTING;
unsigned long flags = FILE_ATTRIBUTE_NORMAL;
void* security_descriptor = NULL;
@@ -588,7 +588,7 @@ TEST(PolicyEngineTest, PolicyRuleCopyConstructorTwoStrings) {
EXPECT_TRUE(policyGen.AddRule(2, &pr_copy));
EXPECT_TRUE(policyGen.Done());
- wchar_t* name = NULL;
+ const wchar_t* name = NULL;
POLPARAMS_BEGIN(eval_params)
POLPARAM(name)
POLPARAMS_END;
« no previous file with comments | « sandbox/win/src/policy_engine_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698