git: 934488354fa4 - 2023Q2 - graphics/xpaint: Fix build in current (llvm15)

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Mon, 08 May 2023 16:33:29 UTC
The branch 2023Q2 has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=934488354fa45ff74cdac42e47c37701ccb77953

commit 934488354fa45ff74cdac42e47c37701ccb77953
Author:     Helge Oldach <freebsd@oldach.net>
AuthorDate: 2023-05-08 14:02:01 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-05-08 16:28:38 +0000

    graphics/xpaint: Fix build in current (llvm15)
    
    PR:             270930
    Reported by:    freebsd@oldach.net (maintainer)
    
    (cherry picked from commit f61b4dc8d512f35101ee052f1193a7a30fba66cc)
---
 graphics/xpaint/files/patch-rw_readWriteJP2K.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/graphics/xpaint/files/patch-rw_readWriteJP2K.c b/graphics/xpaint/files/patch-rw_readWriteJP2K.c
new file mode 100644
index 000000000000..9f12f3a78759
--- /dev/null
+++ b/graphics/xpaint/files/patch-rw_readWriteJP2K.c
@@ -0,0 +1,11 @@
+--- rw/readWriteJP2K.c.orig	2023-05-08 13:59:30 UTC
++++ rw/readWriteJP2K.c
+@@ -69,7 +69,7 @@ ReadJP2K(char *file_name)
+ 	int i, j, k, l, w, h, w0, nc, step, delta, shift, bpp;
+ 	int *src, codec = CODEC_JP2;
+ 
+-	if ((fp = fopen(file_name, "rb")) == NULL) return (-1);
++	if ((fp = fopen(file_name, "rb")) == NULL) return (Image *)(-1);
+ 
+ 	/* Read in the entire file */
+ 	fseek(fp, 0, SEEK_END);