# HG changeset patch # User Luke Mewburn # Date 1588224287 -36000 # Node ID d25ce064c6677d364853cdb9bc0ca060f0e73b87 # Parent 7c9214a5f0954f0cde2b7be82a46c03440e71dbb Correctly fix compiler warnings ASSERT() is only used #ifndef NDEBUG not #ifdef DEBUG Fixes Debug build. diff -r 7c9214a5f095 -r d25ce064c667 libfdproto/fifo.c --- 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 ); diff -r 7c9214a5f095 -r d25ce064c667 libfdproto/messages.c --- 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;