Fix compiler warning for pg_lfind32().
authorNathan Bossart <nathan@postgresql.org>
Wed, 27 Mar 2024 01:27:46 +0000 (20:27 -0500)
committerNathan Bossart <nathan@postgresql.org>
Wed, 27 Mar 2024 01:27:46 +0000 (20:27 -0500)
The newly-introduced "one_by_one" label produces -Wunused-label
warnings when building without SIMD support.  To fix, move the
label into the SIMD section of this function.

Oversight in commit 7644a7340c.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/3189995.1711495704%40sss.pgh.pa.us

src/include/port/pg_lfind.h

index dbc3e9fc6a5cd132656878aa1840f31e057feb41..33e8471b031725e7d29640cd3ca1bfb13fbdeea7 100644 (file)
@@ -194,9 +194,10 @@ pg_lfind32(uint32 key, uint32 *base, uint32 nelem)
    Assert(assert_result == pg_lfind32_simd_helper(keys, &base[nelem - nelem_per_iteration]));
    return pg_lfind32_simd_helper(keys, &base[nelem - nelem_per_iteration]);
 
+one_by_one:
+
 #endif                         /* ! USE_NO_SIMD */
 
-one_by_one:
    /* Process the elements one at a time. */
    for (; i < nelem; i++)
    {