From: Orvid King Date: Mon, 17 Aug 2015 17:37:08 +0000 (-0700) Subject: Remove `unsigned char v = static_cast(v);` X-Git-Tag: v0.54.0~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd69a53aed1a97579a45d48e5a82786651f568df;p=folly.git Remove `unsigned char v = static_cast(v);` Summary: MSVC spotted this very suspicious line when I was running it with /analyze, and complained about using an unitialized variable. This variable isn't used anywhere in the function, and is initializing itself with itself. I have no idea how this compiled in the first place, but apparently it does. This removes the line in question. Closes #295 Reviewed By: @yfeldblum, @paulbiss Differential Revision: D2340688 Pulled By: @sgolemon --- diff --git a/folly/String-inl.h b/folly/String-inl.h index ff085713..1a4edb7d 100644 --- a/folly/String-inl.h +++ b/folly/String-inl.h @@ -203,7 +203,6 @@ void uriUnescape(StringPiece str, String& out, UriEscapeMode mode) { // this is faster than calling push_back repeatedly. while (p != str.end()) { char c = *p; - unsigned char v = static_cast(v); switch (c) { case '%': {