Fix build with -DNDEBUG in CFLAGS

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
diff --git a/block/vvfat.c b/block/vvfat.c
index bb707c0..aaa8593 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2462,10 +2462,13 @@
 	    fail = -2;
 	    break;
 	case ACTION_WRITEOUT: {
+#ifndef NDEBUG
+            /* these variables are only used by assert() below */
 	    direntry_t* entry = array_get(&(s->directory),
 		    commit->param.writeout.dir_index);
 	    uint32_t begin = begin_of_direntry(entry);
 	    mapping_t* mapping = find_mapping_for_cluster(s, begin);
+#endif
 
 	    assert(mapping);
 	    assert(mapping->begin == begin);
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 4649167..07616e3 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -412,7 +412,7 @@
 
     /* unreachable */
     assert(0);
-
+    abort();
 }
 
 /* queue a signal so that it will be send to the virtual CPU as soon
diff --git a/qdict.c b/qdict.c
index 7d1469d..7fb425a 100644
--- a/qdict.c
+++ b/qdict.c
@@ -195,6 +195,7 @@
         return qint_get_int(qobject_to_qint(obj));
     default:
         assert(0);
+        return 0.0;
     }
 }
 
diff --git a/tcg/tcg.c b/tcg/tcg.c
index e6a1caf..1818868 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -27,7 +27,7 @@
 
 #include "config.h"
 
-#ifndef CONFIG_DEBUG_TCG
+#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
 /* define it to suppress various consistency checks (faster) */
 #define NDEBUG
 #endif