File: vteconv-Avoid-gcc-14-compilation-errors.patch

package info (click to toggle)
vte 1%3A0.28.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,140 kB
  • sloc: ansic: 33,674; sh: 10,491; makefile: 541; python: 194; xml: 151
file content (43 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Simon McVittie <smcv@debian.org>
Date: Fri, 27 Dec 2024 13:17:49 +0000
Subject: vteconv: Avoid gcc 14 compilation errors

Bug-Debian: https://bugs.debian.org/1075629
---
 src/vteconv.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/vteconv.c b/src/vteconv.c
index 2b91d33..ab66c39 100644
--- a/src/vteconv.c
+++ b/src/vteconv.c
@@ -384,14 +384,14 @@ _vte_conv_uc(VteConv converter,
 
 #ifdef VTECONV_MAIN
 static void
-clear(gunichar wide[5], gchar narrow[5])
+clear(gunichar wide[5], guchar narrow[5])
 {
 	wide[0] = 'T';
 	wide[1] = 'E';
 	wide[2] = 'S';
 	wide[3] = 'T';
 	wide[4] = '\0';
-	strcpy(narrow, "test");
+	strcpy((gchar *) narrow, "test");
 }
 
 static int
@@ -411,9 +411,10 @@ int
 main(int argc, char **argv)
 {
 	gunichar wide_test[5];
-	gchar narrow_test[5], buf[10];
+	guchar narrow_test[5], buf[10];
 	VteConv conv;
-	gchar *inbuf, *outbuf;
+	const guchar *inbuf;
+	guchar *outbuf;
 	gsize inbytes, outbytes;
 	char mbyte_test[] = {0xe2, 0x94, 0x80};
 	char mbyte_test_break[] = {0xe2, 0xe2, 0xe2};