Skip to content

Commit 3707bcf

Browse files
authored
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 9fb8415)
1 parent d45a961 commit 3707bcf

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Python/pystrtod.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,6 @@ format_float_short(double d, char format_code,
10611061
else {
10621062
/* shouldn't get here: Gay's code should always return
10631063
something starting with a digit, an 'I', or 'N' */
1064-
strncpy(p, "ERR", 3);
1065-
/* p += 3; */
10661064
assert(0);
10671065
}
10681066
goto exit;

0 commit comments

Comments
 (0)