This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d94e901
)
numeric.c: Silence compiler warning
author
Karl Williamson
<khw@cpan.org>
Sun, 15 Jul 2018 17:09:16 +0000
(11:09 -0600)
committer
Karl Williamson
<khw@cpan.org>
Sun, 15 Jul 2018 19:10:55 +0000
(13:10 -0600)
It is always expecting non-NULL, so make it so
numeric.c
patch
|
blob
|
blame
|
history
diff --git
a/numeric.c
b/numeric.c
index
46d8cd8
..
b608615
100644
(file)
--- a/
numeric.c
+++ b/
numeric.c
@@
-1334,7
+1334,7
@@
S_my_atof_infnan(pTHX_ const char* s, bool negative, const char* send, NV* value
* is to try faking the input. We will try inf/-inf/nan
* as the most promising/portable input. */
{
- const char* fake =
NULL
;
+ const char* fake =
"silence compiler warning"
;
char* endp;
NV nv;
#ifdef NV_INF
@@
-1347,7
+1347,7
@@
S_my_atof_infnan(pTHX_ const char* s, bool negative, const char* send, NV* value
fake = "nan";
}
#endif
- assert(
fake
);
+ assert(
strNE(fake, "silence compiler warning")
);
nv = Perl_strtod(fake, &endp);
if (fake != endp) {
#ifdef NV_INF