changeset 1539:d25ce064c667

Correctly fix compiler warnings ASSERT() is only used #ifndef NDEBUG not #ifdef DEBUG Fixes Debug build.
author Luke Mewburn <luke@mewburn.net>
date Thu, 30 Apr 2020 15:24:47 +1000
parents 7c9214a5f095
children 407e0a889c7e
files libfdproto/fifo.c libfdproto/messages.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libfdproto/fifo.c	Mon Apr 20 15:00:11 2020 +1000
+++ b/libfdproto/fifo.c	Thu Apr 30 15:24:47 2020 +1000
@@ -170,7 +170,7 @@
 int fd_fifo_del ( struct fifo  ** queue )
 {
 	struct fifo * q;
-#ifdef DEBUG
+#ifndef NDEBUG
 	int loops = 0;
 #endif
 
@@ -227,7 +227,7 @@
 /* Move the content of old into new, and update loc_update atomically. We leave the old queue empty but valid */
 int fd_fifo_move ( struct fifo * old, struct fifo * new, struct fifo ** loc_update )
 {
-#ifdef DEBUG
+#ifndef NDEBUG
 	int loops = 0;
 #endif
 
@@ -420,7 +420,7 @@
 			pthread_cleanup_pop(0);
 			queue->thrs_push-- ;
 
-#ifndef DEBUG
+#ifdef NDEBUG
 			(void)ret;
 #endif
 			ASSERT( ret == 0 );
--- a/libfdproto/messages.c	Mon Apr 20 15:00:11 2020 +1000
+++ b/libfdproto/messages.c	Thu Apr 30 15:24:47 2020 +1000
@@ -2284,7 +2284,7 @@
 	/* First, check if we already have a model. */
 	if (msg->msg_model != NULL) {
 		/* Check if this model is still valid for the message data */
-#ifdef DEBUG
+#ifndef NDEBUG
 		enum dict_object_type 	 dicttype;
 #endif
 		struct dict_cmd_data     data;
"Welcome to our mercurial repository"