2023-08-16 22:26:55 +00:00
|
|
|
Fix with clang 15: invalid pointer to integer conversion.
|
|
|
|
|
|
|
|
Index: mgp.c
|
|
|
|
--- mgp.c.orig
|
|
|
|
+++ mgp.c
|
2023-09-08 05:21:37 +00:00
|
|
|
@@ -506,16 +506,16 @@ genhtml(start_page)
|
2023-08-16 22:26:55 +00:00
|
|
|
char *childdebug;
|
2023-09-08 05:21:37 +00:00
|
|
|
char *convdb[][3] = {{ "jpg", "cjpeg", "djpeg" },
|
2023-08-16 22:26:55 +00:00
|
|
|
{ "png", "pnmtopng", "pngtopnm" },
|
|
|
|
- { NULL, NULL, NULL }};
|
|
|
|
+ { "", "", "" }};
|
|
|
|
int inum = 0;
|
|
|
|
|
|
|
|
/* check image type */
|
|
|
|
if (htmlimage) {
|
|
|
|
- for (inum = 0; *convdb[inum] != NULL; inum++) {
|
|
|
|
+ for (inum = 0; **convdb[inum] != '\0'; inum++) {
|
|
|
|
if (strcmp(*convdb[inum], htmlimage) == 0)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
- if (*convdb[inum] == NULL) {
|
|
|
|
+ if (**convdb[inum] == '\0') {
|
|
|
|
fprintf(stderr, "unknwon image type %s.\n", htmlimage);
|
2023-09-08 05:21:37 +00:00
|
|
|
/* print out valid image types */
|
|
|
|
fprintf(stderr, "Valid image types: ");
|