diff options
author | Nico Weber <thakis@chromium.org> | 2014-08-29 15:41:53 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-08-29 23:04:13 +0000 |
commit | d85710844c00acbfcf95f84ebcb6012d72eac645 (patch) | |
tree | ae5aa1e78b186d0a9e142d269ed6248fbfcdd9bf /cloud_print | |
parent | 62964a694ce67c5425344e2b6473724808a93f74 (diff) | |
download | chromium_src-d85710844c00acbfcf95f84ebcb6012d72eac645.zip chromium_src-d85710844c00acbfcf95f84ebcb6012d72eac645.tar.gz chromium_src-d85710844c00acbfcf95f84ebcb6012d72eac645.tar.bz2 |
clang/win: Fix a few warnings in targets not in chromium_builder_tests.
Also don't use "default" as a variable name, as it's a keyword.
Also fix a bug where a wstring was passed to %ls.
No real behavior change.
BUG=82385
R=hans@chromium.org
TBR=cpu, vitalybuka
Review URL: https://codereview.chromium.org/526513002
Cr-Commit-Position: refs/heads/master@{#292699}
Diffstat (limited to 'cloud_print')
-rw-r--r-- | cloud_print/gcp20/prototype/x_privet_token.cc | 2 | ||||
-rw-r--r-- | cloud_print/service/win/cloud_print_service.cc | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cloud_print/gcp20/prototype/x_privet_token.cc b/cloud_print/gcp20/prototype/x_privet_token.cc index df26d8e..4093ccb 100644 --- a/cloud_print/gcp20/prototype/x_privet_token.cc +++ b/cloud_print/gcp20/prototype/x_privet_token.cc @@ -59,7 +59,7 @@ bool XPrivetToken::CheckValidXToken(const std::string& token) const { std::string XPrivetToken::GenerateXTokenWithTime(uint64 issue_time) const { std::string result; - std::string issue_time_str = base::StringPrintf("%"PRIu64, issue_time); + std::string issue_time_str = base::StringPrintf("%" PRIu64, issue_time); std::string hash = base::SHA1HashString(secret_ + kXPrivetTokenDelimeter + issue_time_str); diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc index 6f58095..2e15398 100644 --- a/cloud_print/service/win/cloud_print_service.cc +++ b/cloud_print/service/win/cloud_print_service.cc @@ -80,10 +80,11 @@ void InvalidUsage() { std::cout << "\n"; } -base::string16 GetOption(int string_id, const base::string16& default, - bool secure) { +base::string16 GetOption(int string_id, + const base::string16& default_option, + bool secure) { base::string16 prompt_format = cloud_print::LoadLocalString(string_id); - std::vector<base::string16> substitutions(1, default); + std::vector<base::string16> substitutions(1, default_option); std::cout << ReplaceStringPlaceholders(prompt_format, substitutions, NULL); base::string16 tmp; if (secure) { @@ -99,7 +100,7 @@ base::string16 GetOption(int string_id, const base::string16& default, std::getline(std::wcin, tmp); } if (tmp.empty()) - return default; + return default_option; return tmp; } |