CONTRIB: halog: mark the has_zero* functions unused

These ones will depend on the use of memchr() or not, let's mark them unused
to avoid the warning reported in issue #1013.
This commit is contained in:
Willy Tarreau 2020-12-21 08:35:24 +01:00
parent 2df860cb13
commit f531dfff18
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@
#endif #endif
/* return non-zero if the integer contains at least one zero byte */ /* return non-zero if the integer contains at least one zero byte */
static inline unsigned int has_zero32(unsigned int x) static inline __attribute__((unused)) unsigned int has_zero32(unsigned int x)
{ {
unsigned int y; unsigned int y;
@ -72,7 +72,7 @@ static inline unsigned int has_zero32(unsigned int x)
} }
/* return non-zero if the argument contains at least one zero byte. See principle above. */ /* return non-zero if the argument contains at least one zero byte. See principle above. */
static inline unsigned long long has_zero64(unsigned long long x) static inline __attribute__((unused)) unsigned long long has_zero64(unsigned long long x)
{ {
unsigned long long y; unsigned long long y;
@ -81,7 +81,7 @@ static inline unsigned long long has_zero64(unsigned long long x)
return y & 0x8080808080808080ULL; return y & 0x8080808080808080ULL;
} }
static inline unsigned long has_zero(unsigned long x) static inline __attribute__((unused)) unsigned long has_zero(unsigned long x)
{ {
return (sizeof(x) == 8) ? has_zero64(x) : has_zero32(x); return (sizeof(x) == 8) ? has_zero64(x) : has_zero32(x);
} }