diff libfdproto/fifo.c @ 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 3cbe458fbfa9
children 566bb46cc73f
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 );
"Welcome to our mercurial repository"