summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2009-06-22 21:38:49 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2009-06-22 21:38:49 (GMT)
commitf5416d3d2f45b1e670132ef85fde3909db3edb44 (patch)
tree446ab6be3f1a6d141506a0d341d278d55cf6cbac /hl
parent4507076a00f80b2a26da5ee3de6d2b8c376942b9 (diff)
downloadhdf5-f5416d3d2f45b1e670132ef85fde3909db3edb44.zip
hdf5-f5416d3d2f45b1e670132ef85fde3909db3edb44.tar.gz
hdf5-f5416d3d2f45b1e670132ef85fde3909db3edb44.tar.bz2
[svn-r17092] Fixed errors for sun's cc and pgcc
tested: linew, smirom (gcc, icc, pgcc, sun cc)
Diffstat (limited to 'hl')
-rw-r--r--hl/src/H5LR.c12
-rw-r--r--hl/test/test_bitfield.c2
-rw-r--r--hl/test/test_regref_hyper.c33
3 files changed, 24 insertions, 23 deletions
diff --git a/hl/src/H5LR.c b/hl/src/H5LR.c
index 12f820c..ebc2eb9 100644
--- a/hl/src/H5LR.c
+++ b/hl/src/H5LR.c
@@ -1491,10 +1491,10 @@ H5LRcreate_regref_to_all(hid_t loc_id, const char *group_path,
/* First determine the size of the resulting dataset from the region references */
status = H5Lvisit_by_name( loc_id, group_path, index_type, order, op_func_L, NULL, H5P_DEFAULT );
- if(op_func_L<0){
- if(op_func_L == -1) {
+ if((herr_t)*op_func_L < 0){
+ if( (herr_t)*op_func_L == -1) {
H5E_THROW(H5E_CANTCREATE, "H5LR: Failure in internal callback routine H5Oget_info_by_name ")
- } else if(op_func_L == -2) {
+ } else if( (herr_t)*op_func_L == -2) {
H5E_THROW(H5E_CANTCREATE, "H5LR: Failure in internal callback loop over region references ")
}
}
@@ -1532,10 +1532,10 @@ H5LRcreate_regref_to_all(hid_t loc_id, const char *group_path,
if(status <0)
H5E_THROW(H5E_CANTCREATE, "H5LR: Failure in reading or writing data associated with region references")
- if(op_func_L<0){
- if(op_func_L == -1) {
+ if( (herr_t)*op_func_L < 0){
+ if( (herr_t)*op_func_L == -1) {
H5E_THROW(H5E_CANTCREATE, "H5LR: Failure in internal callback routine H5Oget_info_by_name ")
- } else if(op_func_L == -2) {
+ } else if((herr_t)*op_func_L == -2) {
H5E_THROW(H5E_CANTCREATE, "H5LR: Failure in internal callback loop over region references ")
}
}
diff --git a/hl/test/test_bitfield.c b/hl/test/test_bitfield.c
index ae14674..fa92b06 100644
--- a/hl/test/test_bitfield.c
+++ b/hl/test/test_bitfield.c
@@ -129,6 +129,6 @@ int main( void )
return 0;
error:
- return 1;
+ return -1;
}
diff --git a/hl/test/test_regref_hyper.c b/hl/test/test_regref_hyper.c
index bfa8974..fbd830e 100644
--- a/hl/test/test_regref_hyper.c
+++ b/hl/test/test_regref_hyper.c
@@ -170,19 +170,19 @@ static int test_regref_hyper( void )
int data_out2[3][2];
hsize_t block_coord_3D[6] ={ 0, 1, 2, 1, 2, 3};
hsize_t block_coord[4] ={ 3, 3, 5, 4};
- hsize_t num_elem = 2;
- const char *path[num_elem];
+ hsize_t num_elem;
+ char *path[2];
hsize_t block_coord_6[8] ={ 3, 6, 5, 7, 0, 0, 2, 1};
hsize_t block_coord_4[4] ={ 1, 3, 3, 4};
hsize_t block_coord_2D_src[4] ={ 0, 0, 1, 2};
hsize_t block_coord_2D_dest[4] ={5, 5, 7, 6 };
hsize_t block_coord_2D_dest_a[4] ={0, 3, 2, 4 };
hsize_t block_coord_3D_refblock[6] ={ 3, 3, 3, 4, 4, 4 };
- hdset_reg_ref_t ref6[num_elem];
+ hdset_reg_ref_t ref6[2];
hdset_reg_ref_t ref_new;
- hid_t file_id_array[num_elem];
-
+ hid_t file_id_array[2];
+ num_elem = 2;
TESTING("creating dataset for region reference");
path[0] ="/Group_2D/DS2";
@@ -501,10 +501,10 @@ static int test_regref_hyper( void )
*/
TESTING("H5LRget_region, 2D dataset");
/* Read a region of the 2D data using a region reference */
- if ( H5LRread_region(file_id,
- (const hdset_reg_ref_t*)ref[1],
+ if ( H5LRread_region(file_id,
+ (const hdset_reg_ref_t*)ref[1],
H5T_NATIVE_INT,
- &numelem_size,
+ &numelem_size,
NULL) < 0) goto out;
/* check size of data from region reference */
@@ -513,10 +513,10 @@ static int test_regref_hyper( void )
data_out = (int *)malloc( numelem_size * sizeof(int));
- if ( H5LRread_region(file_id,
- (const hdset_reg_ref_t*)ref[1],
+ if ( H5LRread_region(file_id,
+ (const hdset_reg_ref_t*)ref[1],
H5T_NATIVE_INT,
- &numelem_size,
+ &numelem_size,
data_out) < 0) goto out;
@@ -548,7 +548,7 @@ static int test_regref_hyper( void )
numelem_size = (block_coord_3D[3]-block_coord_3D[0]+1) * (block_coord_3D[4]-block_coord_3D[1]+1) * (block_coord_3D[5]-block_coord_3D[2]+1);
- data_out = (int *)malloc( numelem_size * sizeof(int));
+ data_out = (int *)malloc( numelem_size * sizeof(int));
status = H5LTread_region(filename,
@@ -569,11 +569,11 @@ static int test_regref_hyper( void )
} else if( kk+1 == (hsize_t)( block_coord_3D[5]-block_coord_3D[2] + 1)) {
jj = jj+1;
kk = 0;
- }
+ }
else {
kk = kk + 1;
}
- }
+ }
free(data_out);
PASSED();
@@ -680,6 +680,7 @@ static int test_regref_hyper( void )
TESTING("H5LRcreate_region_references, 2D dataset");
+
status = H5LRcreate_region_references(file_id,
num_elem,
path,
@@ -688,7 +689,7 @@ static int test_regref_hyper( void )
if(status < 0) goto out;
PASSED();
- for (i=0; i< (hsize_t)num_elem; i++)
+ for (i=0; i< num_elem; i++)
file_id_array[i] = file_id;
@@ -734,7 +735,7 @@ static int test_regref_hyper( void )
status = H5LRcreate_regref_to_all(file_id, "/",
"/Group_2D/DS2c", H5_INDEX_NAME, H5_ITER_INC);
- if(status < 0) goto out;
+ if(status < 0) goto out;
status = H5LTread_dataset(file_id,"/Group_2D/DS2c",H5T_NATIVE_INT,data_read_1D);