Commit Graph

15 Commits

Author SHA1 Message Date
David Korth
d1ff987d64 [minizip-ng] Fix some warnings that broke -Werror builds.
Initialize some variables, and use memcpy() instead of strncpy().

Remove the -Wno-error options. This broke on Debian 8 ppc (gcc-4.9.2),
which doesn't support -Wstringop-overflow or -Wstringop-truncation.

extlib/minizip-ng/compat/unzip.c: In function ‘unzGetFilePos’:
extlib/minizip-ng/compat/unzip.c:563:38: error: ‘file_pos64.pos_in_zip_directory’ may be used uninitialized [-Werror=maybe-uninitialized]
  563 |     file_pos->pos_in_zip_directory = (uint32_t)file_pos64.pos_in_zip_directory;
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:556:20: note: ‘file_pos64.pos_in_zip_directory’ was declared here
  556 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:564:29: error: ‘file_pos64.num_of_file’ may be used uninitialized [-Werror=maybe-uninitialized]
  564 |     file_pos->num_of_file = (uint32_t)file_pos64.num_of_file;
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extlib/minizip-ng/compat/unzip.c:556:20: note: ‘file_pos64.num_of_file’ was declared here
  556 |     unz64_file_pos file_pos64;
      |                    ^~~~~~~~~~
cc1: all warnings being treated as errors

extlib/minizip-ng/mz_zip.c: In function ‘mz_zip_set_comment’:
extlib/minizip-ng/mz_zip.c:1569:5: error: ‘__builtin___strncpy_chk’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
 1569 |     strncpy(zip->comment, comment, comment_size);
      |     ^
extlib/minizip-ng/mz_zip.c:1563:29: note: length computed here
 1563 |     comment_size = (int32_t)strlen(comment);
      |                             ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
2025-04-07 20:55:55 -04:00
David Korth
05055964a0 [minizip] Update: v4.0.7 -> v4.0.9
[libromdata] J2ME, GcnFstTest: MiniZip's compat headers were moved
in v4.0.8.
2025-04-07 19:14:26 -04:00
David Korth
a0e5dde6a3 [minizip-ng] Update: v4.0.4 -> v4.0.5 2024-03-17 18:45:35 -04:00
David Korth
b4f2ad34e7 [minizip-ng] Update: v4.0.2 -> v4.0.4
[extlib] CMakeLists.txt: Set -DMZ_COMPAT_VERSION=120 so we get
the newer version of unzLocateFile().
2024-01-07 23:51:40 -05:00
David Korth
d7a7f5ca7d [minizip-ng] Update: v4.0.0 -> v4.0.1 2023-09-04 13:21:31 -04:00
David Korth
690d214b80 [minizip-ng] Update: v3.0.10 -> v4.0.0
Major version bump due to removal of ZIP signature creation and
verification.
2023-05-21 13:10:24 -04:00
David Korth
fdf8095300 [minizip-ng] Update: v3.0.8 -> v3.0.10 2023-05-14 11:42:24 -04:00
David Korth
208e6d3b5d [minizip-ng] Update: v3.0.7 -> v3.0.8 2023-01-14 00:00:03 -05:00
David Korth
91cb8f32e2 [minizip-ng] Update: v3.0.6 -> v3.0.7 2022-10-16 14:27:41 -04:00
David Korth
3b3d5d8b69 [minizip-ng] Update: v3.0.4 -> v3.0.6
Among other things, zip.h and unzip.h are now generated in the binary
directory, not the source directory.
2022-05-21 14:20:39 -04:00
David Korth
a03801ae45 [minizip-ng] Restore some rom-properties changes, including a definition for FSCTL_GET_REPARSE_POINT. 2021-12-22 23:35:21 -05:00
David Korth
c11ffb0350 [minizip-ng] Update: v3.0.2 -> v3.0.4 2021-12-22 22:52:45 -05:00
David Korth
86dbf36f3e [cmake] gcc.cmake: Enable -Werror for several different format warnings.
Reference: https://fedoraproject.org/wiki/Format-Security-FAQ

-Werror=format-nonliteral is *not* enabled because there are some
legitimate uses of non-literal format strings.

Separated the warning flags into multiple variables.

Updated everything to build with this change.
2021-09-06 01:41:59 -04:00
David Korth
43976a6e3d [minizip-ng] Update: v3.0.0 -> v3.0.1 2021-03-21 23:49:03 -04:00
David Korth
7d302b51c9 [minizip] Updated from v2.10.5 to minizip-ng 3.0.0.
As of 3.0.0, the minizip fork is now called minizip-ng.

https://github.com/zlib-ng/minizip-ng
2021-02-17 18:38:19 -05:00