diff --git a/list.c b/list.c index 7f5f7bf..640529b 100644 --- a/list.c +++ b/list.c @@ -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) are in order according to LESS given auxiliary data AUX. */ static bool diff --git a/mdriver.c b/mdriver.c index fbdeb1b..5c95ef6 100644 --- a/mdriver.c +++ b/mdriver.c @@ -674,13 +674,13 @@ static trace_t *read_trace(char *tracedir, char *filename, int verbose) } int rc; rc = fscanf(tracefile, "%d", &(trace->sugg_heapsize)); /* not used */ - assert (rc == 1); + if (rc != 1) abort(); rc = fscanf(tracefile, "%d", &(trace->num_ids)); - assert (rc == 1); + if (rc != 1) abort(); rc = fscanf(tracefile, "%d", &(trace->num_ops)); - assert (rc == 1); + if (rc != 1) abort(); 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 */ if ((trace->ops =