mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 05:57:14 +02:00
73 lines
1.9 KiB
Diff
73 lines
1.9 KiB
Diff
Fix -Wimplicit-function-declaration and -Wreturn-mismatch errors with gcc 14.
|
|
|
|
```
|
|
imagelib.c: In function 'alloc_synth_image':
|
|
imagelib.c:109:17: error: implicit declaration of function 'malloc'
|
|
[-Wimplicit-function-declaration]
|
|
109 | rv = (image *)malloc (sizeof(image));
|
|
| ^~~~~~
|
|
|
|
./make-imglib.c: In function 'tokenize':
|
|
./make-imglib.c:205:5: error: 'return' with no value, in function returning
|
|
non-void [-Wreturn-mismatch]
|
|
205 | return;
|
|
| ^~~~~~
|
|
./make-imglib.c:199:1: note: declared here
|
|
199 | tokenize(char *string)
|
|
| ^~~~~~~~
|
|
./make-imglib.c:207:20: error: implicit declaration of function 'isgraph'
|
|
[-Wimplicit-function-declaration]
|
|
207 | while (*next && !isgraph(*next)) next++;
|
|
| ^~~~~~~
|
|
./make-imglib.c:10:1: note: include '<ctype.h>' or provide a declaration of
|
|
'isgraph'
|
|
9 | #include <png.h>
|
|
+++ |+#include <ctype.h>
|
|
```
|
|
|
|
--- ace-1.4-origin/lib/imagelib.c
|
|
+++ ace-1.4/lib/imagelib.c
|
|
@@ -1,4 +1,5 @@
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#include <string.h>
|
|
#include "imagelib.h"
|
|
#include "cards.h"
|
|
--- ace-1.4-origin/lib/make-imglib.c
|
|
+++ ace-1.4/lib/make-imglib.c
|
|
@@ -7,6 +7,7 @@
|
|
#include <dirent.h>
|
|
|
|
#include <png.h>
|
|
+#include <ctype.h>
|
|
|
|
static int verbose = 0;
|
|
static char *basename = "images";
|
|
@@ -202,7 +203,7 @@
|
|
char *rv;
|
|
if (string) {
|
|
next = string;
|
|
- return;
|
|
+ return 0;
|
|
}
|
|
while (*next && !isgraph(*next)) next++;
|
|
if (!*next) return 0;
|
|
@@ -257,7 +258,7 @@
|
|
case 'd':
|
|
depfile = fopen(optarg, "w");
|
|
if (!depfile) {
|
|
- fprintf(stderr, "Unable to open dependency file %s for writing\n", depfile);
|
|
+ fprintf(stderr, "Unable to open dependency file %s for writing\n", optarg);
|
|
perror("The error was");
|
|
exit(1);
|
|
}
|
|
--- ace-1.4-origin/lib/table.c
|
|
+++ ace-1.4/lib/table.c
|
|
@@ -25,6 +25,7 @@
|
|
#include <X11/keysym.h>
|
|
#include <X11/Xatom.h>
|
|
#include <X11/xpm.h>
|
|
+#include <ctype.h>
|
|
|
|
#include "xwin.h"
|
|
|