diff options
author | Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> | 2018-03-06 10:34:35 (GMT) |
---|---|---|
committer | Xiang Zhang <angwerzx@126.com> | 2018-03-06 10:34:35 (GMT) |
commit | efd2bac1564f8141a4eab1bf8779b412974b8d69 (patch) | |
tree | 1315dffee21c21349dff1667ec9927e4380b7fa9 | |
parent | b9650a04a81355c8a7dcd0464c28febfb4bfc0a9 (diff) | |
download | cpython-efd2bac1564f8141a4eab1bf8779b412974b8d69.zip cpython-efd2bac1564f8141a4eab1bf8779b412974b8d69.tar.gz cpython-efd2bac1564f8141a4eab1bf8779b412974b8d69.tar.bz2 |
Fix strncpy warning with gcc 8 (#5840)
The length in strncpy is one char too short and as a result it leads
to a build warning with gcc 8. Comment out the strncpy since the
interpreter aborts immediately after anyway.
-rw-r--r-- | Python/pystrtod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c index 9bf9363..601f7c6 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -1060,8 +1060,8 @@ 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; */ + /* strncpy(p, "ERR", 3); + p += 3; */ Py_UNREACHABLE(); } goto exit; |