diff options
author | Eric Wong <e@80x24.org> | 2014-04-08 03:51:02 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2014-04-08 03:55:51 +0000 |
commit | cd7b4cbacbc968bd4d7ed5fed9122f75d229793c (patch) | |
tree | e015886d93022f647a2364c5eb2ace6395b21627 | |
parent | 3f56e841c3612a113cc5261b01552396cc24ea13 (diff) | |
download | cmogstored-cd7b4cbacbc968bd4d7ed5fed9122f75d229793c.tar.gz |
pthread_exit and abort never returns, so quiet down some warnings when using -Wunreachable-code on clang. Unfortunately using -Wunreachable-code globally is too noisy due to 1) Ragel-generated code. 2) constant branch conditions for build-time options (trace/cork)
-rw-r--r-- | accept_loop.c | 2 | ||||
-rw-r--r-- | svc_dev.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/accept_loop.c b/accept_loop.c index b324735..1821305 100644 --- a/accept_loop.c +++ b/accept_loop.c @@ -48,7 +48,7 @@ MOG_NOINLINE static void accept_error_check(struct mog_accept *ac) assert(0 && "BUG, called accept on bad FD"); case ENOTSOCK: case EOPNOTSUPP: - return pthread_exit(NULL); + pthread_exit(NULL); case_EAGAIN: /* * listen socket could've been inherited from another process, @@ -75,7 +75,6 @@ static struct mog_devlist * svc_devlist(struct mog_svc *svc, dev_t st_dev) assert(0 && "race condition, devlist should insert " "without error"); abort(); - break; case 1: break; /* OK, inserted */ default: mog_oom(); /* -1 */ } |