mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
provide NDEBUG version of macro NC_CHECK which does not use code file name
This commit is contained in:
parent
05dadede2b
commit
8904c5cbc3
@ -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, ... );
|
||||
|
Loading…
Reference in New Issue
Block a user