diff options
Diffstat (limited to 'recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch')
-rw-r--r-- | recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch b/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch deleted file mode 100644 index 2896d9f2..00000000 --- a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 7f601f7c341c80d554615556d60e3b8ed1e5ad4f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
3 | <marmarek@invisiblethingslab.com> | ||
4 | Date: Thu, 5 Apr 2018 03:50:54 +0200 | ||
5 | Subject: [PATCH] tools/gdbsx: fix -Wstringop-truncation warning | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | gcc-8 complains: | ||
11 | |||
12 | gx_main.c: In function 'prepare_stop_reply': | ||
13 | gx_main.c:385:9: error: 'strncpy' output truncated before terminating nul copying 6 bytes from a string of the same length [-Werror=stringop-truncation] | ||
14 | strncpy(buf, "watch:", 6); | ||
15 | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ||
16 | |||
17 | Since terminating '\0' isn't needed here at all, switch to memcpy. | ||
18 | |||
19 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
20 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
21 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
22 | --- | ||
23 | tools/debugger/gdbsx/gx/gx_main.c | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/tools/debugger/gdbsx/gx/gx_main.c b/tools/debugger/gdbsx/gx/gx_main.c | ||
27 | index a908c45..6dfa501 100644 | ||
28 | --- a/tools/debugger/gdbsx/gx/gx_main.c | ||
29 | +++ b/tools/debugger/gdbsx/gx/gx_main.c | ||
30 | @@ -382,7 +382,7 @@ prepare_stop_reply(enum target_signal sig, char *buf, vcpuid_t vcpu) | ||
31 | |||
32 | /* TBD: check if we stopped because of watchpoint */ | ||
33 | if (watchpoint_stop()) { | ||
34 | - strncpy(buf, "watch:", 6); | ||
35 | + memcpy(buf, "watch:", 6); | ||
36 | buf += 6; | ||
37 | /* TBD: **/ | ||
38 | } | ||
39 | -- | ||
40 | 2.7.4 | ||
41 | |||