summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-25 07:26:15 -0600
committerKarl Williamson <khw@cpan.org>2021-07-25 07:41:14 -0600
commit0b8a83109d231afad953b3110a1a83e53cae50cc (patch)
tree2e5c37ef7f7aa2c6d7c9b8dd64e6ac97dd09f3f4 /numeric.c
parent58af9243bbea5db0f4fe479cb5cd4c44eecc3d48 (diff)
downloadperl-0b8a83109d231afad953b3110a1a83e53cae50cc.tar.gz
numeric.c: Silence compiler warning
'negative' is now only used when Perl_strtod() is not available. Recent commits e79f3c064561c5843af40cda89f98bb44f956729 and 7035863f5fa4306e58c8157b2a5893ba5e0f1eaf removed its other uses.
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index f9e880439e..a426d97fe5 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1626,9 +1626,9 @@ Perl_my_atof3(pTHX_ const char* orig, NV* value, const STRLEN len)
const char* send = s + ((len != 0)
? len
: strlen(orig)); /* one past the last */
- bool negative = 0;
#endif
#if defined(USE_PERL_ATOF) && !defined(Perl_strtod)
+ bool negative = 0;
UV accumulator[2] = {0,0}; /* before/after dp */
bool seen_digit = 0;
I32 exp_adjust[2] = {0,0};
@@ -1659,7 +1659,9 @@ Perl_my_atof3(pTHX_ const char* orig, NV* value, const STRLEN len)
/* sign */
switch (*s) {
case '-':
+# if !defined(Perl_strtod)
negative = 1;
+# endif
/* FALLTHROUGH */
case '+':
++s;