From 04d0275dd1d7c937076857547aaa9fc6afb3c8a8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 12 Dec 2013 09:05:55 +0100 Subject: swrap: Don't build with swrap_str_lib() if NDEBUG is defined. This fixes a compile warning on optimized builds. --- src/socket_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index addcc17..0fcdb99 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -355,6 +355,7 @@ enum swrap_lib { SWRAP_LIBSOCKET, }; +#ifndef NDEBUG static const char *swrap_str_lib(enum swrap_lib lib) { switch (lib) { @@ -369,6 +370,7 @@ static const char *swrap_str_lib(enum swrap_lib lib) /* Compiler would warn us about unhandled enum value if we get here */ return "unknown"; } +#endif static void *swrap_load_lib_handle(enum swrap_lib lib) { -- cgit