From: terrynini Date: Sun, 24 Mar 2024 00:04:11 +0000 (+0800) Subject: Fix syntax error of DONT_FAIL_ON_CRC_ERROR in archive_read_support_fo… (#2066) X-Git-Tag: v3.7.3~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7941de217f1595fa4280a5d124e1c2b24d8a1cc3;p=thirdparty%2Flibarchive.git Fix syntax error of DONT_FAIL_ON_CRC_ERROR in archive_read_support_fo… (#2066) Following code snippet in `libarchive/archive_read_support_format_7zip.c` causing a build fail while enable the `DONT_FAIL_ON_CRC_ERROR` ``` /* Check the EncodedHeader CRC.*/ if (r == 0 && zip->header_crc32 != next_header_crc) { archive_set_error(&a->archive, -1, #ifndef DONT_FAIL_ON_CRC_ERROR "Damaged 7-Zip archive"); r = -1; #endif ``` I fix it like this: ``` /* Check the EncodedHeader CRC.*/ if (r == 0 && zip->header_crc32 != next_header_crc) { #ifndef DONT_FAIL_ON_CRC_ERROR archive_set_error(&a->archive, -1, "Damaged 7-Zip archive"); r = -1; #endif ``` Co-authored-by: Huka ---