mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
daemon: Prefer sys/cdefs.h __unreachable over the builtin
The __builtin_unreachable macro provided by Clang and GCC is a hint to
the compiler used for optimization. The programs work fine even if the
compiler doesn't support it. The sys/cdefs.h has had __unreachable for
9 years (commit 732b31de5d
). It expands
to the builtin if it is available. In the rare case that it is
unsupported it expands to a null statement so compilation does not
fail.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, freebsd@igalic.co
Pull Request: https://github.com/freebsd/freebsd-src/pull/1117
This commit is contained in:
parent
606c37c541
commit
f7a10a7752
|
@ -275,7 +275,7 @@ main(int argc, char *argv[])
|
|||
break;
|
||||
case 'h':
|
||||
usage(0);
|
||||
__builtin_unreachable();
|
||||
__unreachable();
|
||||
default:
|
||||
usage(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue