Skip to content

Commit

Permalink
Fix shadow warning from gcc that clang misses
Browse files Browse the repository at this point in the history
  • Loading branch information
mroch committed Sep 27, 2017
1 parent 25d32b3 commit ee8f034
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/dtoa_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ static int i_to_str(int val, char *str) {
return (int)(s - begin);
}

static int decimal(char *dst, int len, int decimal_point, flags flags) {
int leading_zero = flags & LEADING_ZERO;
static int decimal(char *dst, int len, int decimal_point, flags flgs) {
int leading_zero = flgs & LEADING_ZERO;
int d_exp = decimal_point - len, written = 0, shift = 0, j;
if (decimal_point <= 0) {
if (leading_zero) shift++;
Expand All @@ -96,7 +96,7 @@ static int decimal(char *dst, int len, int decimal_point, flags flags) {
return written;
}

static int scientific(char *dst, int len, int decimal_point, flags flags) {
static int scientific(char *dst, int len, int decimal_point, flags flgs) {
int written = 0;
int exponent = decimal_point - 1;

Expand All @@ -109,10 +109,10 @@ static int scientific(char *dst, int len, int decimal_point, flags flags) {
}
dst[len + written++] = 'e';

if (flags & PLUS_IN_EXPONENT && exponent > 0) {
if (flgs & PLUS_IN_EXPONENT && exponent > 0) {
dst[len + written++] = '+';
}
if (flags & PAD_EXPONENT && exponent > 0 && exponent < 10) {
if (flgs & PAD_EXPONENT && exponent > 0 && exponent < 10) {
dst[len + written++] = '0';
}

Expand Down

0 comments on commit ee8f034

Please sign in to comment.