facilitate compilation of all files with NDEBUG

This commit is contained in:
Godmar Back 2020-07-18 22:47:30 -04:00
parent b671c0703b
commit 7980b780a3
2 changed files with 8 additions and 4 deletions

4
list.c
View File

@ -344,6 +344,10 @@ list_reverse (struct list *list)
} }
} }
static bool
is_sorted (struct list_elem *a, struct list_elem *b,
list_less_func *less, void *aux) __attribute__((__unused__));
/* Returns true only if the list elements A through B (exclusive) /* Returns true only if the list elements A through B (exclusive)
are in order according to LESS given auxiliary data AUX. */ are in order according to LESS given auxiliary data AUX. */
static bool static bool

View File

@ -674,13 +674,13 @@ static trace_t *read_trace(char *tracedir, char *filename, int verbose)
} }
int rc; int rc;
rc = fscanf(tracefile, "%d", &(trace->sugg_heapsize)); /* not used */ rc = fscanf(tracefile, "%d", &(trace->sugg_heapsize)); /* not used */
assert (rc == 1); if (rc != 1) abort();
rc = fscanf(tracefile, "%d", &(trace->num_ids)); rc = fscanf(tracefile, "%d", &(trace->num_ids));
assert (rc == 1); if (rc != 1) abort();
rc = fscanf(tracefile, "%d", &(trace->num_ops)); rc = fscanf(tracefile, "%d", &(trace->num_ops));
assert (rc == 1); if (rc != 1) abort();
rc = fscanf(tracefile, "%d", &(trace->weight)); /* not used */ rc = fscanf(tracefile, "%d", &(trace->weight)); /* not used */
assert (rc == 1); if (rc != 1) abort();
/* We'll store each request line in the trace in this array */ /* We'll store each request line in the trace in this array */
if ((trace->ops = if ((trace->ops =