]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lib/libc/string/ffs*.c: work around gcc warning
authorRobert Clausecker <fuz@FreeBSD.org>
Mon, 10 Jul 2023 22:10:52 +0000 (22:10 +0000)
committerRobert Clausecker <fuz@FreeBSD.org>
Fri, 14 Jul 2023 20:26:43 +0000 (22:26 +0200)
commit3f5788e0ed8e85567f651ad360596b8c330af5a9
treec925116f91742a337b3aa744bc4c8842d8dafbcb
parente74bc7757a2ec538c5070973dbd83394933d4bfe
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
lib/libc/string/ffs.c
lib/libc/string/ffsl.c
lib/libc/string/ffsll.c