projects/aports·blob master · refs

40 lines · 1021 B

1Remove unused macros in -Wimplicit-function-declaration error with gcc 14.
2
3```
4In file included from fns.h:3,
5 from n1.c:10:
6n1.c: In function 'get1ch':
7mbwc.h:2:16: error: implicit declaration of function 'p9mbtowc'; did you mean 'mbtowc'? [-Wimplicit-function-declaration]
8 2 | #define mbtowc p9mbtowc
9 | ^~~~~~~~
10n1.c:752:26: note: in expansion of macro 'mbtowc'
11 752 | if ((n = mbtowc(&wc, buf, p-buf)) >= 0)
12 | ^~~~~~
13```
14
15--- 9base-6-origin/troff/fns.h
16+++ 9base-6/troff/fns.h
17@@ -1,7 +1,5 @@
18 #define getline p9getline
19
20-#include "mbwc.h"
21-
22 /*
23 * other
24 */
25--- 9base-6-origin/troff/mbwc.c
26+++ 9base-6/troff/mbwc.c
27@@ -1,5 +1,4 @@
28 #include <stdlib.h>
29-#include "mbwc.h"
30
31 /*
32 * Use the FSS-UTF transformation proposed by posix.
33--- 9base-6-origin/troff/mbwc.h
34+++ /dev/null
35@@ -1,5 +0,0 @@
36-#define mblen p9mblen
37-#define mbtowc p9mbtowc
38-#define mbstowcs p9mbstowcs
39-#define wctomb p9wctomb
40-#define wcstombs p9wcstombs