Fix unused function warning on Arm platforms

Guard definition pg_pmull_available() on compile-time availability
of PMULL. Oversight in fbc57f2bc. In passing, remove "inline" hint
for consistency.

Reported-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/f153d5a4-a9be-4211-b0b2-7e99b56d68d5@vondra.me
This commit is contained in:
John Naylor 2026-04-05 08:49:47 +07:00
parent 69c11f0545
commit 2849fe4c97

View file

@ -108,7 +108,8 @@ pg_crc32c_armv8_available(void)
#endif
}
static inline bool
#ifdef USE_PMULL_CRC32C_WITH_RUNTIME_CHECK
static bool
pg_pmull_available(void)
{
#if defined(__aarch64__) && defined(HWCAP_PMULL)
@ -128,6 +129,7 @@ pg_pmull_available(void)
return false;
#endif
}
#endif /* USE_PMULL_CRC32C_WITH_RUNTIME_CHECK */
/*
* This gets called on the first call. It replaces the function pointer