summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-10-13 16:53:44 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-10-13 16:53:44 (GMT)
commit1eaa64a2246e111789a96365fdda7917308dd77e (patch)
treea6190d18e73627a46e8cbce11e3833f9ae6e0e3d /test/h5test.c
parent166931c024aa8fa895f6f6cfdf2e1fd49e3d7d63 (diff)
downloadhdf5-1eaa64a2246e111789a96365fdda7917308dd77e.zip
hdf5-1eaa64a2246e111789a96365fdda7917308dd77e.tar.gz
hdf5-1eaa64a2246e111789a96365fdda7917308dd77e.tar.bz2
[svn-r15846] Purpose: Declare loop variable at beginning of function
Purpose: On Windows, we were getting compile errors because h5test.c includes a function with variable declarations in the middle of the call. The Microsoft C compiler demands that all variables be declared at the top of the function. This checkin simply moves the declaration to the top to satisfy Visual Studio. Tested: VS2005 on WinXP
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 03fa3b7..029ca3e 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -854,6 +854,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
{
char temp[2048]; /* Temporary buffer for file names */
h5_stat_t sb; /* Structure for querying file info */
+ int j = 0;
if(fapl == H5P_DEFAULT) {
/* Get the file's statistics */
@@ -910,7 +911,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
h5_stat_size_t tot_size = 0;
/* Try all filenames possible, until we find one that's missing */
- for(int j = 0; /*void*/; j++) {
+ for(j = 0; /*void*/; j++) {
/* Create the filename to query */
HDsnprintf(temp, sizeof temp, filename, j);