[pulseaudio-discuss] [PATCH 1/6] macro: Abort() when pa_assert_not_reached() even for NDEBUG

Peter Meerwald pmeerw at pmeerw.net
Sun Nov 9 08:59:21 PST 2014


fixes many warnings when compiling with NDEBUG, such as
  CC       pulse/libpulse_la-channelmap.lo
pulse/channelmap.c: In function 'pa_channel_map_init_auto':
pulse/channelmap.c:397:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
 src/pulsecore/macro.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index 4d5e80f..e36b6ce 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -231,7 +231,7 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
 #endif
 
 #ifdef NDEBUG
-#define pa_assert_not_reached() pa_nop()
+#define pa_assert_not_reached() abort()
 #else
 #define pa_assert_not_reached()                                         \
     do {                                                                \
-- 
1.9.1



More information about the pulseaudio-discuss mailing list