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

Unified Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc

Issue 413763003: clang/win: Fix most -Wwriteable-strings warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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
Index: cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
index 335503a560ef6094369395f17e36549f216904e2..a4b2e0c9534d047f8e8d29a5228cae6b2cf44495 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor_unittest.cc
@@ -236,7 +236,8 @@ TEST_F(PortMonitorTest, FlowTest) {
EXPECT_TRUE(monitor2->pfnEndDocPort != NULL);
// These functions should fail if we have not impersonated the user.
- EXPECT_FALSE(monitor2->pfnStartDocPort(port_handle, L"", 0, 0, NULL));
+ EXPECT_FALSE(monitor2->pfnStartDocPort(
+ port_handle, const_cast<wchar_t*>(L""), 0, 0, NULL));
EXPECT_FALSE(monitor2->pfnWritePort(port_handle,
buffer,
kBufferSize,
@@ -251,7 +252,8 @@ TEST_F(PortMonitorTest, FlowTest) {
// Now impersonate so we can test the success case.
ASSERT_TRUE(ImpersonateSelf(SecurityImpersonation));
- EXPECT_TRUE(monitor2->pfnStartDocPort(port_handle, L"", 0, 0, NULL));
+ EXPECT_TRUE(monitor2->pfnStartDocPort(
+ port_handle, const_cast<wchar_t*>(L""), 0, 0, NULL));
EXPECT_TRUE(monitor2->pfnWritePort(port_handle,
buffer,
kBufferSize,

Powered by Google App Engine
This is Rietveld 408576698