mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Instrument compiler about code unreachability
Clang needs some instrumentation help for static code analysis. It helps gcc and human reader as well.
This commit is contained in:
parent
84cc478cc4
commit
6426e5d3e6
@ -491,6 +491,7 @@ int main(int argc, char *argv[])
|
||||
DEBUGLOG("Can't initialise cluster interface\n");
|
||||
log_error("Can't initialise cluster interface\n");
|
||||
child_init_signal(DFAIL_CLUSTER_IF);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
DEBUGLOG("Cluster ready, doing some more initialisation\n");
|
||||
|
||||
@ -505,8 +506,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Add the local socket to the list */
|
||||
newfd = malloc(sizeof(struct local_client));
|
||||
if (!newfd)
|
||||
if (!newfd) {
|
||||
child_init_signal(DFAIL_MALLOC);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
newfd->fd = local_sock;
|
||||
newfd->removeme = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user