From: Aurelien DARRAGON Date: Wed, 12 Aug 2026 09:09:29 +0000 (+0200) Subject: IMPORT: slz: prevent build compilation error due to unused __slz_make_crc_table() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8f5ed6fcb8a28d6332595732e2a3b9940d3db33;p=thirdparty%2Fhaproxy.git IMPORT: slz: prevent build compilation error due to unused __slz_make_crc_table() In __slz_common_initialize(), __slz_make_crc_table() was not systematically called (ie: when __ARM_FEATURE_CRC32 is defined the crc32_fast[] table is not used). However since the function is defined as static, AND its content is already guarded by the same __ARM_FEATURE_CRC32, we actually need to call always call the function, else we could face a compilation warning on some systems such as: src/slz_common.c:258:20: error: unused function '__slz_make_crc_table' [-Werror,-Wunused-function] 258 | static inline void __slz_make_crc_table(void) This is libslz upstream commit 7d8744a64ca78ff4ac66bff4f6839d416537f312 --- diff --git a/src/slz_common.c b/src/slz_common.c index 62ff4f747..22ec7f586 100644 --- a/src/slz_common.c +++ b/src/slz_common.c @@ -297,7 +297,5 @@ static inline void __slz_make_crc_table(void) __attribute__((constructor)) static void __slz_common_initialize(void) { -#if !defined(__ARM_FEATURE_CRC32) __slz_make_crc_table(); // used by both slz and uslz -#endif }