@@ -130,7 +130,7 @@ static inline ravl_node_t *get_node_next(ravl_node_t *node) {
130
130
return ravl_node_successor (node );
131
131
}
132
132
133
- #ifndef NDEBUG
133
+ #if !defined( NDEBUG ) && defined( UMF_DEVELOPER_MODE )
134
134
static block_t * get_block_prev (ravl_node_t * node ) {
135
135
ravl_node_t * ravl_prev = ravl_node_predecessor (node );
136
136
if (!ravl_prev ) {
@@ -148,7 +148,7 @@ static block_t *get_block_next(ravl_node_t *node) {
148
148
149
149
return get_node_block (ravl_next );
150
150
}
151
- #endif /* NDEBUG */
151
+ #endif /* !defined( NDEBUG) && defined(UMF_DEVELOPER_MODE) */
152
152
153
153
// The functions "coarse_ravl_*" handles the coarse->all_blocks list of blocks
154
154
// 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,
528
528
}
529
529
530
530
#ifndef NDEBUG // begin of DEBUG code
531
+ #ifdef UMF_DEVELOPER_MODE
531
532
532
533
typedef struct debug_cb_args_t {
533
534
coarse_t * provider ;
@@ -606,6 +607,12 @@ static bool debug_check(coarse_t *provider) {
606
607
607
608
return true;
608
609
}
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 */
609
616
#endif /* NDEBUG */ // end of DEBUG code
610
617
611
618
static umf_result_t coarse_add_used_block (coarse_t * coarse , void * addr ,
0 commit comments