1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 19:29:53 +03:00
aports/community/mtm/gcc14-32-bit.patch
mio e3d0a90fb9 community/mtm: fix build with gcc 14 on 32-bit arches
Fix -Wincompatible-pointer-types error with gcc 14 on 32-bit arches.

```
vtparser.c: In function 'docontrol':
vtparser.c:94:45: error: passing argument 7 of 'v->cons[w]' from incompatible pointer type [-Wincompatible-pointer-types]
   94 |             f (v, v->p, w, v->inter, n, a, v->oscbuf);  \
      |                                            ~^~~~~~~~
      |                                             |
      |                                             int *
vtparser.c:97:1: note: in expansion of macro 'DO'
   97 | DO(control, w < MAXCALLBACK && v->cons[w], v->cons[w], 0, NULL)
      | ^~
vtparser.c:94:45: note: expected 'const wchar_t *' {aka 'const long int *'} but argument is of type 'int *'
   94 |             f (v, v->p, w, v->inter, n, a, v->oscbuf);  \
      |                                            ~^~~~~~~~
vtparser.c:97:1: note: in expansion of macro 'DO'
   97 | DO(control, w < MAXCALLBACK && v->cons[w], v->cons[w], 0, NULL)
      | ^~
```
2024-11-22 15:38:28 +00:00

14 lines
466 B
Diff

diff --git a/vtparser.h b/vtparser.h
index 6ebf0ad..6057f85 100644
--- a/vtparser.h
+++ b/vtparser.h
@@ -55,7 +55,8 @@ typedef void (*VTCALLBACK)(VTPARSER *v, void *p, wchar_t w, wchar_t iw,
struct VTPARSER{
STATE *s;
- int narg, nosc, args[MAXPARAM], inter, oscbuf[MAXOSC + 1];
+ int narg, nosc, args[MAXPARAM], inter;
+ wchar_t oscbuf[MAXOSC + 1];
mbstate_t ms;
void *p;
VTCALLBACK print, osc, cons[MAXCALLBACK], escs[MAXCALLBACK],