[ccan] [PATCH] antithread: fix gcc 4.3 errors: control reaches end of non-void function

Reini Urban rurban at x-ray.at
Mon Jan 31 19:46:23 EST 2011


---
 ccan/antithread/antithread.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/ccan/antithread/antithread.c b/ccan/antithread/antithread.c
index 61b288a..430f617 100644
--- a/ccan/antithread/antithread.c
+++ b/ccan/antithread/antithread.c
@@ -391,6 +391,7 @@ void *at_read(struct athread *at)
 	default:
 		/* Should never happen. */
 		err(1, "Short read from athread %p (pid %u)", at, at->pid);
+		return NULL;
 	}
 }

@@ -493,6 +494,7 @@ void *at_read_parent(struct at_pool *atp)
 	default:
 		/* Should never happen. */
 		err(1, "Short read from parent");
+		return NULL;
 	}
 }

-- 
1.7.3.3
-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/


More information about the ccan mailing list