summaryrefslogtreecommitdiffstats
path: root/hl/test
diff options
context:
space:
mode:
Diffstat (limited to 'hl/test')
-rw-r--r--hl/test/test_image.c11
-rw-r--r--hl/test/test_table.c8
2 files changed, 8 insertions, 11 deletions
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index d47cab1..c01dd0d 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -31,15 +31,12 @@ unsigned char image_out2[ WIDTH*HEIGHT*3 ];
int main( void )
{
hid_t file_id;
- herr_t status;
hsize_t width, height, planes;
hsize_t pal_dims[] = {9,3};
hsize_t pal_dims_out[2];
hsize_t i;
char interlace[20];
hssize_t npals;
- herr_t is_image;
- herr_t is_palette;
unsigned char pal_data_out[9*3];
/* create a 9 entry grey palette */
@@ -165,10 +162,10 @@ int main( void )
*-------------------------------------------------------------------------
*/
- if ( (is_image = H5IMis_image( file_id, "Image1" )) < 0 )
+ if ( H5IMis_image( file_id, "Image1" ) < 0 )
goto out;
- if ( (is_image = H5IMis_image( file_id, "Image2" )) < 0 )
+ if ( H5IMis_image( file_id, "Image2" ) < 0 )
goto out;
/*-------------------------------------------------------------------------
@@ -176,7 +173,7 @@ int main( void )
*-------------------------------------------------------------------------
*/
- if ( (is_palette = H5IMis_palette( file_id, "Pallete" )) < 0 )
+ if ( H5IMis_palette( file_id, "Pallete" ) < 0 )
goto out;
/*-------------------------------------------------------------------------
@@ -185,7 +182,7 @@ int main( void )
*/
/* Close the file. */
- status = H5Fclose( file_id );
+ if(H5Fclose( file_id ) < 0) goto out;
PASSED();
return 0;
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index b791fe1..57b3791 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -934,9 +934,9 @@ int test_table(hid_t fid, int write)
rbuf[i].longi != position_in[i].longi ||
rbuf[i].pressure != pressure_in[i] )
{
- fprintf(stderr,"%d %f %d\n",
+ fprintf(stderr,"%ld %f %d\n",
rbuf[i].longi,rbuf[i].pressure,rbuf[i].lati);
- fprintf(stderr,"%d %f %d\n",
+ fprintf(stderr,"%ld %f %d\n",
position_in[i].longi,pressure_in[i],position_in[i].lati);
goto out;
}
@@ -1560,9 +1560,9 @@ static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf )
rbuf[i].pressure != wbuf[j].pressure ||
rbuf[i].temperature != wbuf[j].temperature ) {
fprintf(stderr,"read and write buffers have differences\n");
- fprintf(stderr,"%s %d %f %f %d\n",
+ fprintf(stderr,"%s %ld %f %f %d\n",
rbuf[i].name,rbuf[i].longi,rbuf[i].pressure,rbuf[i].temperature,rbuf[i].lati);
- fprintf(stderr,"%s %d %f %f %d\n",
+ fprintf(stderr,"%s %ld %f %f %d\n",
wbuf[j].name,wbuf[j].longi,wbuf[j].pressure,wbuf[j].temperature,wbuf[j].lati);
return -1;
}