diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 14:47:57 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 14:47:57 +0000 |
commit | d04b350e296735c94d6cdf5d2f0733f78168f64f (patch) | |
tree | 3a9b7e9ccdd1720cafda7bd9d47ca83d9770ae65 /win8 | |
parent | ecd63a8ad61341a3cf9e4bbc100b6d0603952ac1 (diff) | |
download | chromium_src-d04b350e296735c94d6cdf5d2f0733f78168f64f.zip chromium_src-d04b350e296735c94d6cdf5d2f0733f78168f64f.tar.gz chromium_src-d04b350e296735c94d6cdf5d2f0733f78168f64f.tar.bz2 |
Don't pass a string16 to %s.
clang warns:
..\..\win8\delegate_execute\delegate_execute.cc(97,39) : error(clang): cannot pass object of non-trivial type 'const base::string16' (aka 'const basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs]
operation.mutex().c_str(), operation.relaunch_flags());
^
1 error generated.
How did this every work? My guess is that %s interpreted the size_
member variable at the start of string16 as C string, and since the size
usually has a at least the upper byte set to 0, this ended up logging
1-2 garbage bytes.
BUG=82385
NOTRY=true
Review URL: https://codereview.chromium.org/370943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r-- | win8/delegate_execute/delegate_execute.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win8/delegate_execute/delegate_execute.cc b/win8/delegate_execute/delegate_execute.cc index 837505b..1c4e9ec 100644 --- a/win8/delegate_execute/delegate_execute.cc +++ b/win8/delegate_execute/delegate_execute.cc @@ -93,8 +93,8 @@ using delegate_execute::DelegateExecuteOperation; using base::win::ScopedHandle; int RelaunchChrome(const DelegateExecuteOperation& operation) { - AtlTrace("Relaunching [%ls] with flags [%s]\n", - operation.mutex().c_str(), operation.relaunch_flags()); + AtlTrace("Relaunching [%ls] with flags [%ls]\n", + operation.mutex().c_str(), operation.relaunch_flags().c_str()); ScopedHandle mutex(OpenMutexW(SYNCHRONIZE, FALSE, operation.mutex().c_str())); if (mutex.IsValid()) { const int kWaitSeconds = 5; |