summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-17 15:07:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-17 15:07:35 (GMT)
commit77038a81755bd6c853323ba261c9c671800d7be7 (patch)
tree8c61a206ea1a60c319006aa5dd42604170fa7607 /test
parent9474f434a37ee313be94b0388af4322ecdace648 (diff)
downloadhdf5-77038a81755bd6c853323ba261c9c671800d7be7.zip
hdf5-77038a81755bd6c853323ba261c9c671800d7be7.tar.gz
hdf5-77038a81755bd6c853323ba261c9c671800d7be7.tar.bz2
[svn-r18030] Description:
Bring "brush clearing" changes (whitespace & style issues, mostly) from metadata_journaling branch to the "merging" branch, to converge the trunk and the metadata_journaling branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test')
-rw-r--r--test/gen_deflate.c2
-rw-r--r--test/gen_noencoder.c2
-rw-r--r--test/lheap.c29
-rw-r--r--test/ohdr.c2
4 files changed, 22 insertions, 13 deletions
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 16de92e..2d0b746 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -66,7 +66,7 @@ main(void)
/* (Try for something easily compressible) */
for(i=0; i<SPACE_DIM1; i++)
for(j=0; j<SPACE_DIM2; j++)
- data[i][j]=j%5;
+ data[i][j] = (int)(j % 5);
/* Create the file */
file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/test/gen_noencoder.c b/test/gen_noencoder.c
index 3266374..46a2036 100644
--- a/test/gen_noencoder.c
+++ b/test/gen_noencoder.c
@@ -79,5 +79,7 @@ main(void)
H5Dclose(dset_id);
H5Sclose(space_id);
H5Fclose(file_id);
+
+ return(0);
}
diff --git a/test/lheap.c b/test/lheap.c
index 537d42d..b6591ef 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -76,7 +76,7 @@ main(void)
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
goto error;
- if(NULL == (f = H5I_object(file))) {
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -93,16 +93,18 @@ main(void)
}
for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
- if ((size_t)(-1)==(obj[i]=H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf)+1, buf))) {
+ if((size_t)(-1) == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -116,16 +118,18 @@ main(void)
TESTING("local heap read");
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
- if (NULL==(f=H5I_object(file))) {
+ if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) goto error;
+ if(NULL == (f = (H5F_t *)H5I_object(file))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- for (i=0; i<NOBJS; i++) {
+ for(i = 0; i < NOBJS; i++) {
sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
+ for(j = 4; j < i; j++)
+ buf[j] = '0' + j % 10;
+ if(j > 4)
+ buf[j] = '\0';
if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) {
H5_FAILED();
@@ -133,7 +137,7 @@ main(void)
goto error;
}
- if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
+ if (NULL == (s = (const char *)H5HL_offset_into(f, heap, obj[i]))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -147,7 +151,7 @@ main(void)
goto error;
}
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ if(H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -168,3 +172,4 @@ main(void)
} H5E_END_TRY;
return 1;
}
+
diff --git a/test/ohdr.c b/test/ohdr.c
index 0a25993..5425b2b 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -343,6 +343,8 @@ main(void)
/* Open the dataset with the "mark if unknown" message */
if((dset = H5Dopen2(file, "/Dataset3", H5P_DEFAULT)) < 0)
TEST_ERROR
+
+ /* Close the dataset */
if(H5Dclose(dset) < 0)
TEST_ERROR