diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-11 11:15:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-11 11:15:00 +0000 |
commit | f628f442a7a8dc9b377f39ba779fcc52f742a079 (patch) | |
tree | 541ecccb3789ababfcb84c0990cb025d85e7f036 /Carpet | |
parent | f47bb3b1e711ac5ab07822ae0a981d0982cf4866 (diff) |
CarpetIOHDF5: Make macro "HDF5_ERROR" safe
Enclose the macro "HDF5_ERROR" in a do { ... } while (0) pair to make
it safe to use with a trailing semicolon.
darcs-hash:20080111111512-dae7b-b65c7b375ee6ac882b59414db2810f06fcc3d799.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh index 5f0a5a3b1..e3952396e 100644 --- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh +++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.hh @@ -54,7 +54,7 @@ // check return code of HDF5 call and print a warning in case of an error #define HDF5_ERROR(fn_call) \ - { \ + do { \ int _error_code = fn_call; \ \ \ @@ -65,7 +65,7 @@ #fn_call, _error_code); \ error_count++; \ } \ - } + } while (0) // CarpetIOHDF5 GH extension structure |