]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix unused function warning on Arm platforms
authorJohn Naylor <john.naylor@postgresql.org>
Sun, 5 Apr 2026 01:49:47 +0000 (08:49 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Sun, 5 Apr 2026 01:49:47 +0000 (08:49 +0700)
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

src/port/pg_crc32c_armv8_choose.c

index 72d70aea1e16468b4a9dff4c2bd7e724b8d2f651..591e23df44b453317e94fdc478c864fe85f6e37e 100644 (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