mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
IMPORT: slz: silence a build warning on non-x86 non-arm
Building with clang 16 on MIPS64 yields this warning: src/slz.c:931:24: warning: unused function 'crc32_uint32' [-Wunused-function] static inline uint32_t crc32_uint32(uint32_t data) ^ Let's guard it using UNALIGNED_LE_OK which is the only case where it's used. This saves us from introducing a possibly non-portable attribute. This is libslz upstream commit f5727531dba8906842cb91a75c1ffa85685a6421.
This commit is contained in:
parent
31ca29eee1
commit
ccc65012d3
@ -937,6 +937,7 @@ static inline uint32_t crc32_char(uint32_t crc, uint8_t x)
|
||||
return crc;
|
||||
}
|
||||
|
||||
#ifdef UNALIGNED_LE_OK
|
||||
static inline uint32_t crc32_uint32(uint32_t data)
|
||||
{
|
||||
#if defined(__ARM_FEATURE_CRC32)
|
||||
@ -956,6 +957,7 @@ static inline uint32_t crc32_uint32(uint32_t data)
|
||||
#endif
|
||||
return data;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Modified version originally from RFC1952, working with non-inverting CRCs */
|
||||
uint32_t slz_crc32_by1(uint32_t crc, const unsigned char *buf, int len)
|
||||
|
Loading…
Reference in New Issue
Block a user