HomeFreeBSD

lib/libc/string/ffs*.c: work around gcc warning

Description

lib/libc/string/ffs*.c: work around gcc warning

Gcc warns of infinite recursion if we use builtin_ffs*() to
implement ffs*(). This is because gcc uses ffs() to implement
these on some platforms. Sidestep the warning by using
builtin_ctz*() for these.

Sponsored by: FreeBSD Foundation
Reported by: jlduran@gmail.com, jhb
Fixes: ee8b0c43 (D40730)
Reviewed by: jhb, mhorne
Approved by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D40966

Details

Provenance
fuzAuthored on Jul 10 2023, 10:10 PM
Reviewer
jhb
Differential Revision
D40966: lib/libc/string/ffs*.c: fix problems introduced with D40730
Parents
rGe74bc7757a2e: lib/libc/string/ffs*.c: fix problems introduced with D40730
Branches
Unknown
Tags
Unknown