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

Unified Diff: base/strings/safe_sprintf.cc

Issue 868023005: Fix variable shadowing warning in safe_sprintf in VS2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2015-threading
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/safe_sprintf.cc
diff --git a/base/strings/safe_sprintf.cc b/base/strings/safe_sprintf.cc
index 5b575635519265bee696fde37e780b08b0e2118f..b1fcf45b24f7a19f76eb6a175abc82467daa41ea 100644
--- a/base/strings/safe_sprintf.cc
+++ b/base/strings/safe_sprintf.cc
@@ -510,11 +510,11 @@ ssize_t SafeSNPrintf(char* buf, size_t sz, const char* fmt, const Arg* args,
buffer.Pad(' ', padding, 1);
// Convert the argument to an ASCII character and output it.
- char ch = static_cast<char>(arg.integer.i);
- if (!ch) {
+ char as_char = static_cast<char>(arg.integer.i);
+ if (!as_char) {
goto end_of_output_buffer;
}
- buffer.Out(ch);
+ buffer.Out(as_char);
break; }
case 'd': // Output a possibly signed decimal value.
case 'o': // Output an unsigned octal value.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698