SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
25
misc/magicpoint/patches/patch-mgp_c
Normal file
25
misc/magicpoint/patches/patch-mgp_c
Normal file
|
@ -0,0 +1,25 @@
|
|||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue