@@ -130,7 +130,7 @@ static inline ravl_node_t *get_node_next(ravl_node_t *node) {
130130 return ravl_node_successor (node );
131131}
132132
133- #ifndef NDEBUG
133+ #if !defined( NDEBUG ) && defined( UMF_DEVELOPER_MODE )
134134static block_t * get_block_prev (ravl_node_t * node ) {
135135 ravl_node_t * ravl_prev = ravl_node_predecessor (node );
136136 if (!ravl_prev ) {
@@ -148,7 +148,7 @@ static block_t *get_block_next(ravl_node_t *node) {
148148
149149 return get_node_block (ravl_next );
150150}
151- #endif /* NDEBUG */
151+ #endif /* !defined( NDEBUG) && defined(UMF_DEVELOPER_MODE) */
152152
153153// The functions "coarse_ravl_*" handles the coarse->all_blocks list of blocks
154154// sorted by a pointer (block_t->data) to the beginning of the block data.
@@ -528,6 +528,7 @@ static ravl_node_t *free_block_merge_with_next(coarse_t *coarse,
528528}
529529
530530#ifndef NDEBUG // begin of DEBUG code
531+ #ifdef UMF_DEVELOPER_MODE
531532
532533typedef struct debug_cb_args_t {
533534 coarse_t * provider ;
@@ -606,6 +607,12 @@ static bool debug_check(coarse_t *provider) {
606607
607608 return true;
608609}
610+ #else /* !UMF_DEVELOPER_MODE */
611+ static inline bool debug_check (coarse_t * provider ) {
612+ (void )provider ; // suppress unused variable warning
613+ return true;
614+ }
615+ #endif /* !UMF_DEVELOPER_MODE */
609616#endif /* NDEBUG */ // end of DEBUG code
610617
611618static umf_result_t coarse_add_used_block (coarse_t * coarse , void * addr ,
0 commit comments