summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-30 14:03:53 (GMT)
committerGitHub <noreply@github.com>2018-11-30 14:03:53 (GMT)
commit1600f60414e620c4298c15dac803427d8f0a977c (patch)
tree3f202891b24688921c33c71879140df12f85b587 /Misc
parentb7c2182604d5796b5af4c837991aa0b8c8a2d41f (diff)
downloadcpython-1600f60414e620c4298c15dac803427d8f0a977c.zip
cpython-1600f60414e620c4298c15dac803427d8f0a977c.tar.gz
cpython-1600f60414e620c4298c15dac803427d8f0a977c.tar.bz2
Fix compiler warning in call_readline() (GH-10820)
Replace strncpy() with memcpy() in call_readline() to fix the following warning, the NUL byte is written manually just after: Modules/readline.c: In function ‘call_readline’: Modules/readline.c:1303:9: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(p, q, n); ^~~~~~~~~~~~~~~~ Modules/readline.c:1279:9: note: length computed here n = strlen(p); ^~~~~~~~~
Diffstat (limited to 'Misc')
0 files changed, 0 insertions, 0 deletions