diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-05-07 19:37:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-05-07 19:37:48 (GMT) |
commit | bbe03d73613afbcdeca14c045c8b90fac37e0fe8 (patch) | |
tree | 6c6468ecf923ad7f1101e0719d2af1894e63ad64 /hl | |
parent | c952661afbac41d4bf2622899bf2a4c2c02b07b5 (diff) | |
download | hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.zip hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.tar.gz hdf5-bbe03d73613afbcdeca14c045c8b90fac37e0fe8.tar.bz2 |
[svn-r10736] Purpose:
Code cleanup
Description:
Clean up some compiler warnings
Platforms tested:
FreeBSD 4.11 (sleipnir)
h5committest
Diffstat (limited to 'hl')
-rw-r--r-- | hl/src/H5PT.c | 6 | ||||
-rw-r--r-- | hl/test/test_packet.c | 11 | ||||
-rw-r--r-- | hl/tools/gif2h5/readhdf.c | 4 | ||||
-rw-r--r-- | hl/tools/gif2h5/writehdf.c | 3 |
4 files changed, 5 insertions, 19 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index 10b148b..d59e9ed 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -291,8 +291,6 @@ out: */ herr_t H5PT_close( htbl_t* table) { - herr_t return_status = 0; - if(table == NULL) goto out; @@ -670,10 +668,8 @@ out: */ herr_t H5PTis_valid(hid_t table_id) { - htbl_t * table; - /* find the table struct from its ID */ - if((table = (htbl_t *) H5Iobject_verify(table_id, H5PT_ptable_id_type)) ==NULL) + if(H5Iobject_verify(table_id, H5PT_ptable_id_type) ==NULL) return -1; return 0; diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c index 0500edd..0593579 100644 --- a/hl/test/test_packet.c +++ b/hl/test/test_packet.c @@ -82,7 +82,8 @@ static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf ) * function to create a datatype representing the particle struct *------------------------------------------------------------------------- */ -static hid_t make_particle_type() +static hid_t +make_particle_type(void) { hid_t type_id; hid_t string_type; @@ -113,8 +114,6 @@ static hid_t make_particle_type() /* Create a normal HL table just like the HL examples do */ static int create_hl_table(hid_t fid) { - particle_t testparticle; - /* Calculate the offsets of the particle struct members in memory */ size_t part_offset[NFIELDS] = { HOFFSET( particle_t, name ), HOFFSET( particle_t, lati ), @@ -122,12 +121,6 @@ static int create_hl_table(hid_t fid) HOFFSET( particle_t, pressure ), HOFFSET( particle_t, temperature )}; - size_t part_sizes[NFIELDS] = { sizeof( testparticle.name), - sizeof( testparticle.lati), - sizeof( testparticle.longi), - sizeof( testparticle.pressure), - sizeof( testparticle.temperature)}; - /* Define field information */ const char *field_names[NFIELDS] = { "Name","Latitude", "Longitude", "Pressure", "Temperature" }; diff --git a/hl/tools/gif2h5/readhdf.c b/hl/tools/gif2h5/readhdf.c index 4b05ad9..2720d4d 100644 --- a/hl/tools/gif2h5/readhdf.c +++ b/hl/tools/gif2h5/readhdf.c @@ -86,7 +86,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, return -1; } if (H5Tget_size(dtype) != 1) { - fprintf(stderr , "Data is %d bytes per pixel. Cannot convert to GIF\n",H5Tget_size(dtype)); + fprintf(stderr , "Data is %d bytes per pixel. Cannot convert to GIF\n",(int)H5Tget_size(dtype)); return -1; } @@ -141,7 +141,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, return -1; } if (H5Tget_size(pal_dtype) != 1) { - fprintf(stderr , "Palette data is %d bytes per pixel. Cannot convert to GIF\n",H5Tget_size(pal_dtype)); + fprintf(stderr , "Palette data is %d bytes per pixel. Cannot convert to GIF\n",(int)H5Tget_size(pal_dtype)); return -1; } diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c index 7df7f29..d343aae 100644 --- a/hl/tools/gif2h5/writehdf.c +++ b/hl/tools/gif2h5/writehdf.c @@ -25,7 +25,6 @@ static int write_text_attribute(hid_t dataset_id , const char *attr_name, const char *attr_value, const size_t attr_len) { /* variables for the attributes */ - hsize_t attr_dims; /* dimensions for the attribute */ hsize_t attr_size; /* dimensions for the attribute */ hid_t attr_dataspace_id; /* dataspaces needed for the various attributes */ hid_t attr_attr_id; /* attribute id */ @@ -35,8 +34,6 @@ static int write_text_attribute(hid_t dataset_id , const char *attr_name, if (!attr_name || !attr_value) return -1; - attr_dims = 1; - /* figure out size of the data */ attr_size = (hsize_t)attr_len; |