]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
IMPORT: slz: prevent build compilation error due to unused __slz_make_crc_table()
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 12 Aug 2026 09:09:29 +0000 (11:09 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 12 Aug 2026 09:11:02 +0000 (11:11 +0200)
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

src/slz_common.c

index 62ff4f747be8dc630656a38f6f75a3195d5b5b15..22ec7f586f7fdc15851e5d7d890dbd2765e7c799 100644 (file)
@@ -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
 }