diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-04 15:32:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-06-04 15:32:05 (GMT) |
commit | 99f66946f1ac4fc05fc1a213b2026c5d6a721d33 (patch) | |
tree | 37239cac6b6e6f3d2e2c4aaf149a63ad8a46bd8f /test/testhdf5.h | |
parent | cb01b00e740259a7e5a60c84891f2cc207bef59e (diff) | |
download | hdf5-99f66946f1ac4fc05fc1a213b2026c5d6a721d33.zip hdf5-99f66946f1ac4fc05fc1a213b2026c5d6a721d33.tar.gz hdf5-99f66946f1ac4fc05fc1a213b2026c5d6a721d33.tar.bz2 |
[svn-r6954] Purpose:
Code cleanup
Description:
Wrap macro parameters with parantheses to avoid errors in expanding them.
Platforms tested:
FreeBSD 4.8 (sleipnir) w/C++
FreeBSD 4.8 (sleipnir) w/parallel
h5committested
Diffstat (limited to 'test/testhdf5.h')
-rw-r--r-- | test/testhdf5.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/testhdf5.h b/test/testhdf5.h index 1ccb513..1d37e5d 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -37,10 +37,10 @@ extern int Verbosity; if (Verbosity>9) print_func(" Call to routine: %15s at line %4d " \ "in %s returned %ld \n", \ where, (int)__LINE__, __FILE__, \ - (long)ret); \ - if (ret == val) { \ + (long)(ret)); \ + if ((ret) == (val)) { \ print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ - "in %s\n", where, (long)ret, (int)__LINE__, __FILE__); \ + "in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \ num_errs++; \ H5Eprint (stdout); \ } \ @@ -79,11 +79,11 @@ extern int Verbosity; #define VERIFY(x, val, where) do { \ if (Verbosity>9) { \ print_func(" Call to routine: %15s at line %4d in %s had value " \ - "%ld \n", where, (int)__LINE__, __FILE__, (long)x); \ + "%ld \n", (where), (int)__LINE__, __FILE__, (long)(x)); \ } \ - if (x != val) { \ + if ((x) != (val)) { \ print_func("*** UNEXPECTED VALUE from %s should be %ld, but is %ld at line %4d " \ - "in %s\n", where, (long)val, (long)x, (int)__LINE__, __FILE__); \ + "in %s\n", (where), (long)(val), (long)(x), (int)__LINE__, __FILE__); \ H5Eprint (stdout); \ num_errs++; \ } \ @@ -94,12 +94,12 @@ extern int Verbosity; #define RESULT(ret,func) do { \ if (Verbosity>8) { \ print_func(" Call to routine: %15s at line %4d in %s returned " \ - "%ld\n", func, (int)__LINE__, __FILE__, (long)ret); \ + "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \ } \ if (Verbosity>9) HEprint(stdout, 0); \ - if (ret == FAIL) { \ + if ((ret) == FAIL) { \ print_func("*** UNEXPECTED RETURN from %s is %ld at line %4d " \ - "in %s\n", func, (long)ret, (int)__LINE__, __FILE__); \ + "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \ H5Eprint (stdout); \ num_errs++; \ } \ |