aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/builtin.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-19 15:45:12 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-19 15:45:31 -0800
commit947f659f969b318eb7757656e28188e5d2d0f5cf (patch)
tree866487c6f6473f86d765b40362fc4d1725eb2862 /src/builtin.cpp
parent8703c5bc00aa7349d65078f8b2c0c5a7a8ed9c74 (diff)
Miscellaneous cleanup and dead code removal
Noticed by cppcheck
Diffstat (limited to 'src/builtin.cpp')
-rw-r--r--src/builtin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin.cpp b/src/builtin.cpp
index ae6c85b2..d79c8880 100644
--- a/src/builtin.cpp
+++ b/src/builtin.cpp
@@ -1705,7 +1705,6 @@ static unsigned int builtin_echo_digit(wchar_t wc, unsigned int base)
static bool builtin_echo_parse_numeric_sequence(const wchar_t *str, size_t *consumed, unsigned char *out_val)
{
bool success = false;
- unsigned char val = 0; //resulting character
unsigned int start = 0; //the first character of the numeric part of the sequence
unsigned int base = 0, max_digits = 0;
@@ -1731,6 +1730,7 @@ static bool builtin_echo_parse_numeric_sequence(const wchar_t *str, size_t *cons
if (base != 0)
{
unsigned int idx;
+ unsigned char val = 0; //resulting character
for (idx = start; idx < start + max_digits; idx++)
{
unsigned int digit = builtin_echo_digit(str[idx], base);