From 7941de217f1595fa4280a5d124e1c2b24d8a1cc3 Mon Sep 17 00:00:00 2001 From: terrynini Date: Sun, 24 Mar 2024 08:04:11 +0800 Subject: [PATCH] =?utf8?q?Fix=20syntax=20error=20of=20DONT=5FFAIL=5FON=5FC?= =?utf8?q?RC=5FERROR=20in=20archive=5Fread=5Fsupport=5Ffo=E2=80=A6=20(#206?= =?utf8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 -- 2.47.2