This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix build with GCC 8: strncpy ->strcpy
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 22 Nov 2017 08:23:46 -0500
- Subject: [binutils-gdb] Fix build with GCC 8: strncpy ->strcpy
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT a9f26f609e3a1b6ae3aab300b55442e0a81e2bce ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: a9f26f609e3a1b6ae3aab300b55442e0a81e2bce
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.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Ubuntu-AArch32-m32, branch master