summaryrefslogtreecommitdiffstats
path: root/hl/examples/ex_table_05.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-09 18:45:44 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-09 18:45:44 (GMT)
commit31ffa03914360f530544c48d6a930abc5009e3d8 (patch)
tree423d8b500386470b0e7371091184214dd9d5fcae /hl/examples/ex_table_05.c
parent64f65d96d945210c23b28e124d286505e31bb68c (diff)
downloadhdf5-31ffa03914360f530544c48d6a930abc5009e3d8.zip
hdf5-31ffa03914360f530544c48d6a930abc5009e3d8.tar.gz
hdf5-31ffa03914360f530544c48d6a930abc5009e3d8.tar.bz2
[svn-r26405] Removed compiler warnings, hl/examples:
HDF5-237 tested: h5committest
Diffstat (limited to 'hl/examples/ex_table_05.c')
-rw-r--r--hl/examples/ex_table_05.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/hl/examples/ex_table_05.c b/hl/examples/ex_table_05.c
index f0c96eb..7ed1fec 100644
--- a/hl/examples/ex_table_05.c
+++ b/hl/examples/ex_table_05.c
@@ -51,13 +51,6 @@ int main( void )
int longi;
} Position;
- /* Define a subset of Particle, with name and pressure fields */
- typedef struct NamePressure
- {
- char name[16];
- float pressure;
- } NamePressure;
-
/* Calculate the type_size and the offsets of our struct members */
Particle dst_buf[NRECORDS];
size_t dst_size = sizeof( Particle );
@@ -91,7 +84,6 @@ int main( void )
hsize_t nfields;
hsize_t start; /* Record to start reading/writing */
hsize_t nrecords; /* Number of records to read/write */
- herr_t status;
int i;
/* Define new values for the field "Pressure" */
@@ -129,7 +121,7 @@ int main( void )
file_id = H5Fcreate( "ex_table_05.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
/* Make the table */
- 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 );
@@ -137,7 +129,7 @@ int main( void )
nfields = 1;
start = 2;
nrecords = NRECORDS_ADD;
- status=H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pre, start, nrecords,
+ H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pre, start, nrecords,
sizeof( float ), 0, field_sizes_pre, pressure_in );
@@ -145,12 +137,12 @@ int main( void )
nfields = 2;
start = 2;
nrecords = NRECORDS_ADD;
- status=H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pos, start, nrecords,
+ H5TBwrite_fields_index( file_id, TABLE_NAME, nfields, field_index_pos, start, nrecords,
sizeof( Position ), field_offset_pos, field_sizes_pos, position_in );
/* read the table */
- 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<NRECORDS; i++) {
@@ -163,8 +155,7 @@ int main( void )
printf ("\n");
}
-
- /* close type */
+ /* close type */
H5Tclose( string_type );
/* close the file */