Skip to content

Commit

Permalink
Fixed various -Wunused-variable warnings
Browse files Browse the repository at this point in the history
Some of these the compiler is now able to identify thanks to the previous fixes of -Wmissing-variable-declarations warnings, making the variables static.
  • Loading branch information
seanm committed Jun 15, 2023
1 parent c4a039a commit 874315c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion c++/examples/h5tutr_extend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ main(void)

// Get information to obtain memory dataspace.
rank = filespace->getSimpleExtentNdims();
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
(void)filespace->getSimpleExtentDims(dimsr);

if (H5D_CHUNKED == prop.getLayout())
rank_chunk = prop.getChunk(rank, chunk_dimsr);
Expand Down
4 changes: 2 additions & 2 deletions c++/examples/readdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ main(void)
* Get order of datatype and print message if it's a little endian.
*/
H5std_string order_string;
H5T_order_t order = intype.getOrder(order_string);
(void)intype.getOrder(order_string);
cout << order_string << endl;

/*
Expand All @@ -109,7 +109,7 @@ main(void)
* display them.
*/
hsize_t dims_out[2];
int ndims = dataspace.getSimpleExtentDims(dims_out, NULL);
(void)dataspace.getSimpleExtentDims(dims_out, NULL);
cout << "rank " << rank << ", dimensions " << (unsigned long)(dims_out[0]) << " x "
<< (unsigned long)(dims_out[1]) << endl;

Expand Down
2 changes: 1 addition & 1 deletion examples/h5_vds-exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ main(void)
kdims[3] = {KDIM0, KDIM1, KDIM2}, kdims_max[3] = {H5S_UNLIMITED, KDIM1, KDIM2},
ndims[3] = {NDIM0, NDIM1, NDIM2}, ndims_max[3] = {H5S_UNLIMITED, NDIM1, NDIM2},
start[3], /* Hyperslab parameters */
stride[3], count[3], block[3];
count[3], block[3];
hsize_t start_out[3], stride_out[3], count_out[3], block_out[3];
int k = 2;
int n = 3;
Expand Down
2 changes: 1 addition & 1 deletion examples/h5_vds-exclim.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main(void)
herr_t status;
hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2}, kdims[3] = {KDIM0, KDIM1, KDIM2},
ndims[3] = {NDIM0, NDIM1, NDIM2}, start[3], /* Hyperslab parameters */
stride[3], count[3], block[3];
count[3], block[3];
hsize_t start_out[3], stride_out[3], count_out[3], block_out[3];
int k = 2;
int n = 3;
Expand Down
2 changes: 1 addition & 1 deletion examples/h5_vds.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ main(void)
hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Virtual datasets dimension */
dims[1] = {DIM0}, /* Source datasets dimensions */
start[2], /* Hyperslab parameters */
stride[2], count[2], block[2];
count[2], block[2];
hsize_t start_out[2], stride_out[2], count_out[2], block_out[2];
int wdata[DIM0], /* Write buffer for source dataset */
rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */
Expand Down
2 changes: 1 addition & 1 deletion test/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static const char *FILENAME[] = {"mount_1", "mount_2", "mount_3", "mount_4", "mo
#define NX 4
#define NY 5
#define NAME_BUF_SIZE 40
static int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */
static int bm[NX][NY]; /* Data buffers */

/*-------------------------------------------------------------------------
* Function: setup
Expand Down
1 change: 0 additions & 1 deletion tools/lib/h5tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ int region_output; /* region output */
int oid_output; /* oid output */
int data_output; /* data output */
int attr_data_output; /* attribute data output */
static int compound_data;

unsigned packed_bits_num; /* number of packed bits to display */
unsigned packed_data_offset; /* offset of packed bits to display */
Expand Down

0 comments on commit 874315c

Please sign in to comment.