summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-09-26 14:44:45 (GMT)
committerGitHub <noreply@github.com>2018-09-26 14:44:45 (GMT)
commit3707bcf02b7574448d7137935995146f6e8ea810 (patch)
treef58b557d90a7f01e2895db8978a71935be8f6850 /Python
parentd45a9613402b686f8afd3dd5b6acf8141f14d711 (diff)
downloadcpython-3707bcf02b7574448d7137935995146f6e8ea810.zip
cpython-3707bcf02b7574448d7137935995146f6e8ea810.tar.gz
cpython-3707bcf02b7574448d7137935995146f6e8ea810.tar.bz2
Drop confusing commented out code in pystrtod.c (GH-6072) (GH-9587)
Fix the following warning: Python/pystrtod.c: In function 'format_float_short': Python/pystrtod.c:1007:13: warning: 'strncpy' output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation] strncpy(p, "ERR", 3); (cherry picked from commit 9fb84157595a385f15799e5d0729c1e1b0ba9d38)
Diffstat (limited to 'Python')
-rw-r--r--Python/pystrtod.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 58278c2..1c63560 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -1061,8 +1061,6 @@ format_float_short(double d, char format_code,
else {
/* shouldn't get here: Gay's code should always return
something starting with a digit, an 'I', or 'N' */
- strncpy(p, "ERR", 3);
- /* p += 3; */
assert(0);
}
goto exit;