From 64496c8da77a519207d50468b0bab4a89b829805 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Fri, 22 Mar 2019 10:03:32 -0600 Subject: [PATCH] fixed warnings --- src/clib/pio_lists.c | 13 +++---------- src/clib/pio_rearrange.c | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/clib/pio_lists.c b/src/clib/pio_lists.c index 090e457e85a..3ac5baea25a 100644 --- a/src/clib/pio_lists.c +++ b/src/clib/pio_lists.c @@ -23,18 +23,12 @@ static file_desc_t *current_file = NULL; */ void pio_add_to_file_list(file_desc_t *file) { - file_desc_t *cfile; - assert(file); - /* Get a pointer to the global list of files. */ - cfile = pio_file_list; - /* Keep a global pointer to the current file. */ current_file = file; - /* If there is nothing in the list, then file will be the first - * entry. Otherwise, move to end of the list. */ + /* Add file to list. */ HASH_ADD_INT(pio_file_list, pio_ncid, file); } @@ -279,10 +273,10 @@ int pio_delete_iodesc_from_list(int ioid) io_desc_t *ciodesc; ciodesc = pio_get_iodesc_from_id(ioid); - if(ciodesc) + if (ciodesc) { HASH_DEL(pio_iodesc_list, ciodesc); - if (current_iodesc = ciodesc) + if (current_iodesc == ciodesc) current_iodesc = pio_iodesc_list; free(ciodesc); return PIO_NOERR; @@ -367,7 +361,6 @@ int get_var_desc(int varid, var_desc_t **varlist, var_desc_t **var_desc) int delete_var_desc(int varid, var_desc_t **varlist) { var_desc_t *v; - var_desc_t *prev = NULL; int ret; /* Check inputs. */ diff --git a/src/clib/pio_rearrange.c b/src/clib/pio_rearrange.c index 8aa1c596cb7..e5ebec55de0 100644 --- a/src/clib/pio_rearrange.c +++ b/src/clib/pio_rearrange.c @@ -991,7 +991,6 @@ int rearrange_io2comp(iosystem_desc_t *ios, io_desc_t *iodesc, void *sbuf, int niotasks; int mpierr; /* Return code from MPI calls. */ int ret; - void *tmparray; /* Check inputs. */ pioassert(ios && iodesc, "invalid input", __FILE__, __LINE__);