Skip to content

Commit

Permalink
Merge pull request #1326 from NetCDF-World-Domination-Council/ejh_fil…
Browse files Browse the repository at this point in the history
…e_name_in_built_files

provide NDEBUG version of macro NC_CHECK which does not use code file name
  • Loading branch information
WardF authored Mar 8, 2019
2 parents 44cefb1 + 8904c5c commit c0d24c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ncdump/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ extern char *progname; /* for error messages */
extern "C" {
#endif

/* For NDEBUG builds, provide a version of NC_CHECK that does not
* include a file name. Including a file name causes heartache for the
* debian package builders. They already use NDEBUG to turn off the
* file names in asserts. */
#ifdef NDEBUG
#define NC_CHECK(fncall) {int ncstat=fncall;if(ncstat!=NC_NOERR)check(ncstat,"",__LINE__);}
#else
#define NC_CHECK(fncall) {int ncstat=fncall;if(ncstat!=NC_NOERR)check(ncstat,__FILE__,__LINE__);}
#endif /* NDEBUG */

/* Print error message to stderr and exit */
extern void error ( const char *fmt, ... );
Expand Down

0 comments on commit c0d24c8

Please sign in to comment.