FreeBSD Bugzilla – Attachment 238569 Details for
Bug 268185
devel/zziplib: Fix build with clang 15
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/zziplib: fix build with clang 15
devel__zziplib-fix-clang15-2.diff (text/plain), 3.20 KB, created by
Dimitry Andric
on 2022-12-06 12:17:31 UTC
(
hide
)
Description:
devel/zziplib: fix build with clang 15
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2022-12-06 12:17:31 UTC
Size:
3.20 KB
patch
obsolete
>commit fd3a98b02c65d6edadee1be85232340fe15b6845 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Mon Dec 5 23:55:48 2022 +0100 > > devel/zziplib: fix build with clang 15 > > During an exp-run for llvm 15 (see bug 265425), it turned out that > devel/zziplib failed to build with clang (and lld) 15: > > /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:664:11: error: incompatible pointer to integer conversion initializing 'off_t' (aka 'long') with an expression of type 'zzip_byte_t *' (aka 'unsigned char *') [-Wint-conversion] > off_t offset = zzip_file_header_to_data(header); > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:666:34: warning: incompatible pointer types initializing 'struct zzip_extra_zip64 *' with an expression of type 'char *' [-Wincompatible-pointer-types] > struct zzip_extra_zip64* zip64 = > ^ > /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:673:34: warning: incompatible pointer types initializing 'struct zzip_extra_zip64 *' with an expression of type 'char *' [-Wincompatible-pointer-types] > struct zzip_extra_zip64* zip64 = > ^ > /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:685:24: error: incompatible integer to pointer conversion assigning to 'Bytef *' (aka 'unsigned char *') from 'off_t' (aka 'long') [-Wint-conversion] > file->zlib.next_in = offset; > ^ ~~~~~~ > 2 warnings and 2 errors generated. > > Indeed, at several points it is needed to cast the returned pointers to > off_t, or vice versa. > >diff --git a/devel/zziplib/files/patch-zzip_mmapped.c b/devel/zziplib/files/patch-zzip_mmapped.c >new file mode 100644 >index 000000000000..affcda9947c5 >--- /dev/null >+++ b/devel/zziplib/files/patch-zzip_mmapped.c >@@ -0,0 +1,31 @@ >+--- zzip/mmapped.c.orig 2021-01-04 23:05:08 UTC >++++ zzip/mmapped.c >+@@ -661,16 +661,16 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR >+ >+ ___ /* a ZIP64 extended block may follow. */ >+ size_t csize = zzip_file_header_csize(header); >+- off_t offset = zzip_file_header_to_data(header); >++ off_t offset = (off_t) zzip_file_header_to_data(header); >+ if (csize == 0xFFFFu) { >+- struct zzip_extra_zip64* zip64 = >++ struct zzip_extra_zip64* zip64 = (struct zzip_extra_zip64 *) >+ zzip_file_header_to_extras(header); >+ if (ZZIP_EXTRA_ZIP64_CHECK(zip64)) { >+ csize = zzip_extra_zip64_csize(zip64); >+ } >+ } >+ if (offset == 0xFFFFu) { >+- struct zzip_extra_zip64* zip64 = >++ struct zzip_extra_zip64* zip64 = (struct zzip_extra_zip64 *) >+ zzip_file_header_to_extras(header); >+ if (ZZIP_EXTRA_ZIP64_CHECK(zip64)) { >+ offset = zzip_extra_zip64_offset(zip64); >+@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR >+ file->zlib.zalloc = Z_NULL; >+ file->zlib.zfree = Z_NULL; >+ file->zlib.avail_in = csize; >+- file->zlib.next_in = offset; >++ file->zlib.next_in = (Bytef *) offset; >+ ____; >+ >+ DBG2("compressed size %i", (int) file->zlib.avail_in);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268185
:
238559
|
238569
|
238689