Skip to content

Commit

Permalink
fixed more codacy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Mar 28, 2019
1 parent cf96820 commit 9b2ffde
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/cunit/test_perf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,21 @@ int test_darray(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank
int test_decomp_read_write(int iosysid, int ioid, int num_flavors, int *flavor, int my_rank,
int rearranger, MPI_Comm test_comm)
{
char filename[PIO_MAX_NAME + 1]; /* Name for the output files. */
int ioid2; /* ID for decomposition we will create from file. */
char title_in[PIO_MAX_NAME + 1]; /* Optional title. */
char history_in[PIO_MAX_NAME + 1]; /* Optional history. */
int fortran_order_in; /* Indicates fortran vs. c order. */
int ret; /* Return code. */

/* Use PIO to create the decomp file in each of the four
* available ways. */
for (int fmt = 0; fmt < num_flavors; fmt++)
{
int ioid2; /* ID for decomposition we will create from file. */
char filename[PIO_MAX_NAME + 1]; /* Name for the output files. */
char title_in[PIO_MAX_NAME + 1]; /* Optional title. */
char history_in[PIO_MAX_NAME + 1]; /* Optional history. */
int fortran_order_in; /* Indicates fortran vs. c order. */
int ret; /* Return code. */

/* Create the filename. */
sprintf(filename, "decomp_%s_iotype_%d.nc", TEST_NAME, flavor[fmt]);
snprintf(filename, PIO_MAX_NAME, "decomp_%s_iotype_%d.nc", TEST_NAME,
flavor[fmt]);

if ((ret = PIOc_write_nc_decomp(iosysid, filename, 0, ioid, NULL, NULL, 0)))
return ret;
Expand Down

0 comments on commit 9b2ffde

Please sign in to comment.