From 31ffa03914360f530544c48d6a930abc5009e3d8 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Mon, 9 Mar 2015 13:45:44 -0500 Subject: [svn-r26405] Removed compiler warnings, hl/examples: HDF5-237 tested: h5committest --- hl/examples/ex_image1.c | 9 ++++----- hl/examples/ex_image2.c | 10 +++++----- hl/examples/ex_lite1.c | 5 ++--- hl/examples/ex_lite2.c | 7 +++---- hl/examples/ex_lite3.c | 11 +++++------ hl/examples/ex_table_01.c | 5 ++--- hl/examples/ex_table_02.c | 7 +++---- hl/examples/ex_table_03.c | 7 +++---- hl/examples/ex_table_04.c | 9 ++++----- hl/examples/ex_table_05.c | 19 +++++-------------- hl/examples/ex_table_06.c | 5 ++--- hl/examples/ex_table_07.c | 7 +++---- hl/examples/ex_table_08.c | 9 ++++----- hl/examples/ex_table_09.c | 11 +++++------ hl/examples/ex_table_10.c | 11 +++++------ hl/examples/ex_table_11.c | 9 ++++----- hl/examples/ex_table_12.c | 7 +++---- 17 files changed, 62 insertions(+), 86 deletions(-) diff --git a/hl/examples/ex_image1.c b/hl/examples/ex_image1.c index 96bc7c7..18ad903 100644 --- a/hl/examples/ex_image1.c +++ b/hl/examples/ex_image1.c @@ -24,7 +24,6 @@ unsigned char buf [ WIDTH*HEIGHT ]; int main( void ) { hid_t file_id; - herr_t status; hsize_t pal_dims[] = {PAL_ENTRIES,3}; size_t i, j; int n, space; @@ -56,16 +55,16 @@ int main( void ) file_id = H5Fcreate( "ex_image1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); /* make the image */ - status = H5IMmake_image_8bit( file_id, "image1", (hsize_t)WIDTH, (hsize_t)HEIGHT, buf ); + H5IMmake_image_8bit( file_id, "image1", (hsize_t)WIDTH, (hsize_t)HEIGHT, buf ); /* make a palette */ - status = H5IMmake_palette( file_id, "pallete", pal_dims, pal ); + H5IMmake_palette( file_id, "pallete", pal_dims, pal ); /* attach the palette to the image */ - status = H5IMlink_palette( file_id, "image1", "pallete" ); + H5IMlink_palette( file_id, "image1", "pallete" ); /* close the file. */ - status = H5Fclose( file_id ); + H5Fclose( file_id ); return 0; diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c index 3276f7c..b57f1b7 100644 --- a/hl/examples/ex_image2.c +++ b/hl/examples/ex_image2.c @@ -35,7 +35,7 @@ int main( void ) hsize_t height; /* height of image */ unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */ hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */ - herr_t status, i, n; + herr_t i, n; /* create a new HDF5 file using default properties. */ file_id = H5Fcreate( "ex_image2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); @@ -45,7 +45,7 @@ int main( void ) goto out; /* make the image */ - status=H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf ); + H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf ); if (gbuf) { free(gbuf); gbuf = NULL; @@ -63,10 +63,10 @@ int main( void ) } /* make a palette */ - status=H5IMmake_palette( file_id, PAL_NAME, pal_dims, pal ); + H5IMmake_palette( file_id, PAL_NAME, pal_dims, pal ); /* attach the palette to the image */ - status=H5IMlink_palette( file_id, IMAGE1_NAME, PAL_NAME ); + H5IMlink_palette( file_id, IMAGE1_NAME, PAL_NAME ); /*------------------------------------------------------------------------- * True color image example with pixel interlace @@ -78,7 +78,7 @@ int main( void ) goto out; /* make dataset */ - status=H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf ); + H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf ); /* close the file. */ H5Fclose( file_id ); diff --git a/hl/examples/ex_lite1.c b/hl/examples/ex_lite1.c index 2a82fef..446c803 100644 --- a/hl/examples/ex_lite1.c +++ b/hl/examples/ex_lite1.c @@ -25,16 +25,15 @@ int main( void ) hid_t file_id; hsize_t dims[RANK]={2,3}; int data[6]={1,2,3,4,5,6}; - herr_t status; /* create a HDF5 file */ file_id = H5Fcreate ("ex_lite1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); /* create and write an integer type dataset named "dset" */ - status = H5LTmake_dataset(file_id,"/dset",RANK,dims,H5T_NATIVE_INT,data); + H5LTmake_dataset(file_id,"/dset",RANK,dims,H5T_NATIVE_INT,data); /* close file */ - status = H5Fclose (file_id); + H5Fclose (file_id); return 0; } diff --git a/hl/examples/ex_lite2.c b/hl/examples/ex_lite2.c index 98f92c8..a696a20 100644 --- a/hl/examples/ex_lite2.c +++ b/hl/examples/ex_lite2.c @@ -21,17 +21,16 @@ int main( void ) hid_t file_id; int data[6]; hsize_t dims[2]; - herr_t status; size_t i, j, nrow, n_values; /* open file from ex_lite1.c */ file_id = H5Fopen ("ex_lite1.h5", H5F_ACC_RDONLY, H5P_DEFAULT); /* read dataset */ - status = H5LTread_dataset_int(file_id,"/dset",data); + H5LTread_dataset_int(file_id,"/dset",data); /* get the dimensions of the dataset */ - status = H5LTget_dataset_info(file_id,"/dset",dims,NULL,NULL); + H5LTget_dataset_info(file_id,"/dset",dims,NULL,NULL); /* print it by rows */ n_values = (size_t)(dims[0] * dims[1]); @@ -44,7 +43,7 @@ int main( void ) } /* close file */ - status = H5Fclose (file_id); + H5Fclose (file_id); return 0; diff --git a/hl/examples/ex_lite3.c b/hl/examples/ex_lite3.c index 9164c7b..f409ea4 100644 --- a/hl/examples/ex_lite3.c +++ b/hl/examples/ex_lite3.c @@ -26,7 +26,6 @@ int main( void ) hid_t space_id; hsize_t dims[1] = { ATTR_SIZE }; int data[ATTR_SIZE] = {1,2,3,4,5}; - herr_t status; int i; /* create a file */ @@ -39,8 +38,8 @@ int main( void ) dset_id = H5Dcreate2(file_id, "dset", H5T_NATIVE_INT, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* close */ - status = H5Dclose(dset_id); - status = H5Sclose(space_id); + H5Dclose(dset_id); + H5Sclose(space_id); /*------------------------------------------------------------------------- * example of H5LTset_attribute_int @@ -48,7 +47,7 @@ int main( void ) */ /* create and write the attribute "attr1" on the dataset "dset" */ - status = H5LTset_attribute_int(file_id, "dset", "attr1", data, ATTR_SIZE); + H5LTset_attribute_int(file_id, "dset", "attr1", data, ATTR_SIZE); /*------------------------------------------------------------------------- * example of H5LTget_attribute_int @@ -56,14 +55,14 @@ int main( void ) */ /* get the attribute "attr1" from the dataset "dset" */ - status = H5LTget_attribute_int(file_id, "dset", "attr1", data); + H5LTget_attribute_int(file_id, "dset", "attr1", data); for(i = 0; i < ATTR_SIZE; i++ ) printf(" %d", data[i]); printf("\n"); /* close file */ - status = H5Fclose(file_id); + H5Fclose(file_id); return 0; } diff --git a/hl/examples/ex_table_01.c b/hl/examples/ex_table_01.c index de304d9..1d381ae 100644 --- a/hl/examples/ex_table_01.c +++ b/hl/examples/ex_table_01.c @@ -80,7 +80,6 @@ int main( void ) hsize_t chunk_size = 10; int *fill_data = NULL; int compress = 0; - herr_t status; int i; /* Initialize field_type */ @@ -100,7 +99,7 @@ int main( void ) *------------------------------------------------------------------------- */ - status=H5TBmake_table( "Table Title", file_id, TABLE_NAME,NFIELDS,NRECORDS, + H5TBmake_table( "Table Title", file_id, TABLE_NAME,NFIELDS,NRECORDS, dst_size,field_names, dst_offset, field_type, chunk_size, fill_data, compress, p_data ); @@ -109,7 +108,7 @@ int main( void ) *------------------------------------------------------------------------- */ - status=H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf ); + H5TBread_table( file_id, TABLE_NAME, dst_size, dst_offset, dst_sizes, dst_buf ); /* print it by rows */ for (i=0; i