2
0
mirror of https://github.com/HDFGroup/hdf5.git synced 2025-03-19 16:50:46 +08:00

[svn-r5605] Purpose:

Code cleanup

Description:
    Clean up some compiler warnings...

Platforms tested:
    FreeBSD 4.5 (sleipnir)
This commit is contained in:
Quincey Koziol 2002-06-12 13:24:25 -05:00
parent bdefbb5cba
commit 1ae81a8ede
4 changed files with 16 additions and 11 deletions

@ -23,6 +23,8 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/time.h>
#include <sys/uio.h>
#include <unistd.h>
/* our header files */
#include "hdf5.h"

@ -6912,14 +6912,16 @@ H5T_enum_nameof(H5T_t *dt, void *value, char *name/*out*/, size_t size)
assert(name || 0==size);
if (name && size>0) *name = '\0';
/* Sanity check */
if (dt->u.enumer.nmembs == 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL,
"datatype has no members");
}
/* Do a binary search over the values to find the correct one */
H5T_sort_value(dt, NULL);
lt = 0;
rt = dt->u.enumer.nmembs;
if (rt == 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL,
"datatype has no members");
}
md = -1;
while (lt<rt) {
@ -6985,14 +6987,16 @@ H5T_enum_valueof(H5T_t *dt, const char *name, void *value/*out*/)
assert(name && *name);
assert(value);
/* Sanity check */
if (dt->u.enumer.nmembs == 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL,
"datatype has no members");
}
/* Do a binary search over the names to find the correct one */
H5T_sort_name(dt, NULL);
lt = 0;
rt = dt->u.enumer.nmembs;
if (rt == 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL,
"datatype has no members");
}
md = -1;
while (lt<rt) {

@ -357,11 +357,10 @@ test_tr2(hid_t file)
*-------------------------------------------------------------------------
*/
static int
test_value_dsnt_exist()
test_value_dsnt_exist(void)
{
hid_t datatype_id; /* identifiers */
herr_t status;
int val;
char nam[100];
size_t size = 100;

@ -62,8 +62,8 @@ char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
hid_t h5_fileaccess(void);
void h5_no_hwconv(void);
void h5_reset(void);
#ifdef H5_HAVE_PARALLEL
void h5_show_hostname(void);
#ifdef H5_HAVE_PARALLEL
int h5_set_info_object(void);
void h5_dump_info_object(MPI_Info info);
#endif