diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-06-04 21:29:05 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-06-04 21:29:05 (GMT) |
commit | dd51aae3ca540fc43ca398beaed9f6643b880265 (patch) | |
tree | 5678b1ca712e93c2d7f75daca7a7901dad1a6ff0 /src/H5D.c | |
parent | 56e4d8fb0cbbcd1b1036b361758ff84a40d2cb01 (diff) | |
download | hdf5-dd51aae3ca540fc43ca398beaed9f6643b880265.zip hdf5-dd51aae3ca540fc43ca398beaed9f6643b880265.tar.gz hdf5-dd51aae3ca540fc43ca398beaed9f6643b880265.tar.bz2 |
[svn-r5530] Purpose:
Code Cleanup
Description:
Removed some compiler warnings.
Solution:
In a few cases, NULL was being returned when a FAIL was supposed to
be returned instead. There were some header files which needed to be
included in a few of the sources. A couple of if-then statements had
assignments in the conditional part. The compiler warned that they
should have extra "()"s around them. Made the code check the values
instead.
Platforms tested:
Linux (parallel) Modi4 (parallel)
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -12,10 +12,14 @@ /* $Id$ */ +#define H5F_PACKAGE /*suppress error about including H5Fpkg */ + #include "H5private.h" /* Generic Functions */ #include "H5Iprivate.h" /* IDs */ #include "H5Dprivate.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5Fprivate.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Gprivate.h" /* Group headers */ @@ -2274,10 +2278,11 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, /* Collect Parallel I/O information for possible later use */ if (H5FD_MPIO==H5P_peek_hid_t(dx_plist,H5D_XFER_VFL_ID_NAME)) { doing_mpio++; - if (dx=H5P_peek_voidp(dx_plist,H5D_XFER_VFL_INFO_NAME)) - xfer_mode = dx->xfer_mode; - else + if (NULL == (dx=H5P_peek_voidp(dx_plist,H5D_XFER_VFL_INFO_NAME))) { HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "unable to retrieve data xfer info"); + } else { + xfer_mode = dx->xfer_mode; + } } /* end if */ /* Collective access is not permissible without the MPIO driver */ if (doing_mpio && xfer_mode==H5FD_MPIO_COLLECTIVE && @@ -2708,10 +2713,11 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, /* Collect Parallel I/O information for possible later use */ if (H5FD_MPIO==H5P_peek_hid_t(dx_plist,H5D_XFER_VFL_ID_NAME)) { doing_mpio++; - if (dx=H5P_peek_voidp(dx_plist,H5D_XFER_VFL_INFO_NAME)) - xfer_mode = dx->xfer_mode; - else + if (NULL==(dx=H5P_peek_voidp(dx_plist,H5D_XFER_VFL_INFO_NAME))) { HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, "unable to retrieve data xfer info"); + } else { + xfer_mode = dx->xfer_mode; + } } /* end if */ /* Collective access is not permissible without the MPIO driver */ if (doing_mpio && xfer_mode==H5FD_MPIO_COLLECTIVE && |