summaryrefslogtreecommitdiffstats
path: root/src/H5Fsfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fsfile.c')
-rw-r--r--src/H5Fsfile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/H5Fsfile.c b/src/H5Fsfile.c
index ef80a79..6cf2c80 100644
--- a/src/H5Fsfile.c
+++ b/src/H5Fsfile.c
@@ -47,14 +47,17 @@ static H5F_sfile_node_t *H5F_sfile_head_s = NULL;
*-------------------------------------------------------------------------
*/
void
-H5F_sfile_assert_num(unsigned n)
+H5F_sfile_assert_num(unsigned H5_ATTR_NDEBUG_UNUSED n)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
+ /* The only useful work this function does is asserting so when NDEBUG
+ * is defined it's a no-op.
+ */
+#ifndef NDEBUG
if (n == 0) {
- /* Sanity checking */
assert(H5F_sfile_head_s == NULL);
- } /* end if */
+ }
else {
unsigned count; /* Number of open shared files */
H5F_sfile_node_t *curr; /* Current shared file node */
@@ -68,11 +71,11 @@ H5F_sfile_assert_num(unsigned n)
/* Advance to next shared file node */
curr = curr->next;
- } /* end while */
+ }
- /* Sanity checking */
assert(count == n);
- } /* end else */
+ }
+#endif
FUNC_LEAVE_NOAPI_VOID
} /* H5F_sfile_assert_num() */