mirror of
https://github.com/python/cpython.git
synced 2026-04-22 11:50:50 +00:00
Drop confusing commented out code in pystrtod.c (GH-6072) (GH-9586)
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 9fb8415759)
This commit is contained in:
parent
69d63bbbd6
commit
b54fc15e32
1 changed files with 0 additions and 2 deletions
|
|
@ -1062,8 +1062,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; */
|
||||
Py_UNREACHABLE();
|
||||
}
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue