Fix build with GCC 8: strncpy ->strcpy
authorYao Qi <yao.qi@linaro.org>
Wed, 22 Nov 2017 12:22:11 +0000 (12:22 +0000)
committerYao Qi <yao.qi@linaro.org>
Wed, 22 Nov 2017 12:22:11 +0000 (12:22 +0000)
commita9f26f609e3a1b6ae3aab300b55442e0a81e2bce
treef8eb85e7a41177838af4fa3aa1ea6c8956162025
parent29f9a5673764c1b2711c0ceeba380a6ee764d1b2
Fix build with GCC 8: strncpy ->strcpy

Recent gcc 8 trunk emits the warning below,

../../binutils-gdb/gdb/python/py-gdb-readline.c:79:15: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
       strncpy (q, p, n);
       ~~~~~~~~^~~~~~~~~
../../binutils-gdb/gdb/python/py-gdb-readline.c:73:14: note: length computed here
   n = strlen (p);
       ~~~~~~~^~~

gdb:

2017-11-22  Yao Qi  <yao.qi@linaro.org>

* python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
gdb/ChangeLog
gdb/python/py-gdb-readline.c
This page took 0.026632 seconds and 4 git commands to generate.