26 lines
680 B
Text
26 lines
680 B
Text
|
Fix with clang 15: invalid pointer to integer conversion.
|
||
|
|
||
|
Index: mgp.c
|
||
|
--- mgp.c.orig
|
||
|
+++ mgp.c
|
||
|
@@ -448,16 +448,16 @@ genhtml(start_page)
|
||
|
char *childdebug;
|
||
|
char convdb[][3][16] = {{ "jpg", "cjpeg", "djpeg" },
|
||
|
{ "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);
|
||
|
cleanup(-1);
|
||
|
}
|