]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix FreeBSD builds with WARNS=6 (#1869)
authorEnji Cooper <1574099+ngie-eign@users.noreply.github.com>
Sat, 13 May 2023 04:11:07 +0000 (21:11 -0700)
committerGitHub <noreply@github.com>
Sat, 13 May 2023 04:11:07 +0000 (21:11 -0700)
commit4ebfd961873310cac894ffd579e4569f369e8990
tree1a8ecadbdc80e2af635f7e272208350f15b062de
parentf180dcab3321149ef348e9899737db29eeaaecf0
Fix FreeBSD builds with WARNS=6 (#1869)

WARNS=6 on FreeBSD passes several CFLAGS that causes the previous code
to fail with `-Wincompatible-pointer-types-discards-qualifiers` when
compiled with clang.

This particular change adjusts the code to be
`-Wincompatible-pointer-types-discards-qualifiers` clean. This change
changes the calls to use OSSL_PARAM macro abbreviated calls, instead of
calling more verbose (and less documented) callers.

While here, also address a `mac` object leak if `ctx` cannot be
allocated cleanly by always free'ing `mac` after it's been attached to
`ctx`.

Co-authored-by: Pierre Pronchery <pierre@freebsdfoundation.org>
Sponsored by: The FreeBSD Foundation
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
libarchive/archive_hmac.c
libarchive/archive_hmac_private.h