HomeFreeBSD

cdefs.h: add __inline to __always_inline

Description

cdefs.h: add inline to always_inline

Add inline to the always_inline macro to quiet dozens of gcc
warnings of the form:
warning: 'always_inline' function might not be inlinable [-Wattributes]

It's clearly the intention of the always_inline macro applied to a
function to inline the function. However, gcc seems to be picky with
the -Wattributes. It appears that
attribute((always_inline))
was intended to apply to inline functions, as in, function declarations
with the attribute should also be declared as inline. Both clang and
gcc sources themselves use the two in combination:
inline
attribute((always_inline__))

FreeBSD sources mostly only use __always_inline, without the inline
keyword. Only a few files in libmsun used both.

Reviewed by: imp, kib, olce
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D45711

Details

Provenance
rlibbyAuthored on Jun 25 2024, 5:39 PM
Reviewer
imp
Differential Revision
D45711: cdefs.h: add __inline to __always_inline
Parents
rG8aa9192ce98a: isp: fix ISPCTL_ABORT_CMD switch case
Branches
Unknown
Tags
Unknown