Skip to content

Commit

Permalink
Merge pull request ESMCI#1547 from NCAR/ejh_travis_3
Browse files Browse the repository at this point in the history
turning on -Werror for C compiler
  • Loading branch information
edhartnett authored Jun 27, 2019
2 parents 1994cde + a0b4d54 commit b8b52b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ env:

script:
- autoreconf -i
- export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer'
- export CFLAGS='-std=c99 -fsanitize=address -fno-omit-frame-pointer -Werror'
- export FFLAGS='-fsanitize=address -fno-omit-frame-pointer'
- export FCFLAGS='-fsanitize=address -fno-omit-frame-pointer'
- export DISTCHECK_CONFIGURE_FLAGS='--enable-fortran'
Expand Down
25 changes: 0 additions & 25 deletions examples/c/darray_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,6 @@ int dim_len[NDIM3] = {NC_UNLIMITED, DIM_LEN_X, DIM_LEN_Y};
/* Names of dimensions. */
char dim_name[NDIM3][PIO_MAX_NAME + 1] = {"unlimted", "x", "y"};

/* Handle MPI errors. This should only be used with MPI library
* function calls. */
#define MPIERR(e) do { \
MPI_Error_string(e, err_buffer, &resultlen); \
printf("MPI error, line %d, file %s: %s\n", __LINE__, __FILE__, err_buffer); \
MPI_Finalize(); \
return 2; \
} while (0)

/* Handle non-MPI errors by finalizing the MPI library and exiting
* with an exit code. */
#define ERR(e) do { \
MPI_Finalize(); \
return e; \
} while (0)

/* Global err buffer for MPI. When there is an MPI error, this buffer
* is used to store the error message that is associated with the MPI
* error. */
char err_buffer[MPI_MAX_ERROR_STRING];

/* This is the length of the most recent MPI error message, stored
* int the global error string. */
int resultlen;

/* @brief Check the output file.
*
* Use netCDF to check that the output is as expected.
Expand Down

0 comments on commit b8b52b9

Please sign in to comment.