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.