Skip to content

Commit

Permalink
Merge pull request ESMCI#1634 from NCAR/ejh_warnings
Browse files Browse the repository at this point in the history
fixed warnings related to netcdf integration code
  • Loading branch information
edwardhartnett authored Feb 19, 2020
2 parents d92cb28 + cac94b3 commit 6aa9c60
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/clib/pio_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ int create_file_handler(iosystem_desc_t *ios)
int mode;
int use_ext_ncid;
char ncidp_present;
int iosysid = 0;
#ifdef NETCDF_INTEGRATION
int iosysid;
#endif /* NETCDF_INTEGRATION */
int mpierr;

PLOG((1, "create_file_handler comproot = %d", ios->comproot));
Expand All @@ -201,14 +203,14 @@ int create_file_handler(iosystem_desc_t *ios)
if (ncidp_present)
if ((mpierr = MPI_Bcast(&ncid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((1, "create_file_handler len %d filename %s iotype %d mode %d "
"use_ext_ncid %d ncidp_present %d ncid %d", len,
filename, iotype, mode, use_ext_ncid, ncidp_present, ncid));
#ifdef NETCDF_INTEGRATION
if ((mpierr = MPI_Bcast(&iosysid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((1, "create_file_handler iosysid %d", iosysid));
#endif /* NETCDF_INTEGRATION */
PLOG((1, "create_file_handler len %d filename %s iotype %d mode %d "
"use_ext_ncid %d ncidp_present %d ncid %d iosysid %d", len,
filename, iotype, mode, use_ext_ncid, ncidp_present, ncid,
iosysid));

/* Call the create file function. */
if (use_ext_ncid)
Expand Down Expand Up @@ -1979,7 +1981,9 @@ int open_file_handler(iosystem_desc_t *ios)
int iotype;
int mode;
int use_ext_ncid;
int iosysid = 0;
#ifdef NETCDF_INTEGRATION
int iosysid;
#endif /* NETCDF_INTEGRATION */
int mpierr;

PLOG((1, "open_file_handler comproot = %d", ios->comproot));
Expand All @@ -2002,14 +2006,14 @@ int open_file_handler(iosystem_desc_t *ios)
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
if ((mpierr = MPI_Bcast(&use_ext_ncid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d",
len, filename, iotype, mode, use_ext_ncid));
#ifdef NETCDF_INTEGRATION
if ((mpierr = MPI_Bcast(&iosysid, 1, MPI_INT, 0, ios->intercomm)))
return check_mpi(ios, NULL, mpierr, __FILE__, __LINE__);
PLOG((2, "iosysid %d", iosysid));
#endif /* NETCDF_INTEGRATION */

PLOG((2, "len %d filename %s iotype %d mode %d use_ext_ncid %d iosysid %d",
len, filename, iotype, mode, use_ext_ncid, iosysid));

/* Call the open file function. Errors are handled within
* function, so return code can be ignored. */
if (use_ext_ncid)
Expand Down

0 comments on commit 6aa9c60

Please sign in to comment.