diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1999-11-17 22:00:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1999-11-17 22:00:15 (GMT) |
commit | 9648d22f5f387640de8140acd7d2193bcd6770ad (patch) | |
tree | 20905fda3ba2ecf9259c0cc9c4ef0658a79ad903 /test | |
parent | 9e014467b62df66322de63e21be565ed59a079b3 (diff) | |
download | hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.zip hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.tar.gz hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.tar.bz2 |
[svn-r1837] Cleaned up a few warnings from the SGI compiler.
Diffstat (limited to 'test')
-rw-r--r-- | test/dsets.c | 8 | ||||
-rw-r--r-- | test/flush1.c | 3 | ||||
-rw-r--r-- | test/h5test.c | 6 | ||||
-rw-r--r-- | test/tvlstr.c | 10 | ||||
-rw-r--r-- | test/tvltypes.c | 8 |
5 files changed, 16 insertions, 19 deletions
diff --git a/test/dsets.c b/test/dsets.c index b98730f..2a84173 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -734,7 +734,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL))<0 || (dset=H5Dcreate(grp, "bitfield_1", type, space, H5P_DEFAULT))<0) goto error; - for (i=0; i<sizeof buf; i++) buf[i] = 0xff ^ i; + for (i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0) goto error; if (H5Sclose(space)<0) goto error; @@ -747,7 +747,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL))<0 || (dset=H5Dcreate(grp, "bitfield_2", type, space, H5P_DEFAULT))<0) goto error; - for (i=0; i<sizeof buf; i++) buf[i] = 0xff ^ i; + for (i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0) goto error; if (H5Sclose(space)<0) goto error; @@ -761,7 +761,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL))<0 || (dset=H5Dcreate(grp, "opaque_1", type, space, H5P_DEFAULT))<0) goto error; - for (i=0; i<sizeof buf; i++) buf[i] = 0xff ^ i; + for (i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0) goto error; if (H5Sclose(space)<0) goto error; @@ -775,7 +775,7 @@ test_types(hid_t file) (space=H5Screate_simple(1, &nelmts, NULL))<0 || (dset=H5Dcreate(grp, "opaque_2", type, space, H5P_DEFAULT))<0) goto error; - for (i=0; i<sizeof buf; i++) buf[i] = 0xff ^ i; + for (i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i; if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf)<0) goto error; if (H5Sclose(space)<0) goto error; diff --git a/test/flush1.c b/test/flush1.c index 9382b63..bc51375 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -94,6 +94,3 @@ main(void) _exit(1); } - - - diff --git a/test/h5test.c b/test/h5test.c index 13ea124..04f7de0 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -116,7 +116,7 @@ h5_cleanup(hid_t fapl) } else if (H5FD_MULTI==driver) { H5FD_mem_t mt; assert(strlen(multi_letters)==H5FD_MEM_NTYPES); - for (mt=0; mt<H5FD_MEM_NTYPES; mt++) { + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++) { HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]); remove(temp); /*don't care if it fails*/ @@ -212,7 +212,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) /* Prepend the prefix value to the base name */ if (prefix && *prefix) { - if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name)==(int)size) { + if (HDsnprintf(fullname, (long)size, "%s/%s", prefix, base_name)==(int)size) { return NULL; /*buffer is too small*/ } } else if (strlen(base_name)>=size) { @@ -310,7 +310,7 @@ h5_fileaccess(void) memset(memb_addr, 0, sizeof memb_addr); assert(strlen(multi_letters)==H5FD_MEM_NTYPES); - for (mt=0; mt<H5FD_MEM_NTYPES; mt++) { + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt++) { memb_fapl[mt] = H5P_DEFAULT; sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]); memb_name[mt] = sv[mt]; diff --git a/test/tvlstr.c b/test/tvlstr.c index a227aa6..dc3ccd6 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -62,10 +62,10 @@ void *test_vlstr_alloc_custom(size_t size, void *info) * This weird contortion is required on the DEC Alpha to keep the * alignment correct - QAK */ - extra=MAX(sizeof(void *),sizeof(int)); + extra=MAX(sizeof(void *),sizeof(size_t)); if((ret_value=HDmalloc(extra+size))!=NULL) { - *(int *)ret_value=size; + *(size_t *)ret_value=size; *mem_used+=size; } /* end if */ ret_value=((unsigned char *)ret_value)+extra; @@ -90,11 +90,11 @@ void test_vlstr_free_custom(void *_mem, void *info) * This weird contortion is required on the DEC Alpha to keep the * alignment correct - QAK */ - extra=MAX(sizeof(void *),sizeof(int)); + extra=MAX(sizeof(void *),sizeof(size_t)); if(_mem!=NULL) { mem=((unsigned char *)_mem)-extra; - *mem_used-=*(int *)mem; + *mem_used-=*(size_t *)mem; HDfree(mem); } /* end if */ } @@ -182,7 +182,7 @@ test_vlstrings_basic(void) for(i=0; i<SPACE1_DIM1; i++) { if(strlen(wdata[i])!=strlen(rdata[i])) { num_errs++; - printf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,strlen(wdata[i]),(int)i,strlen(rdata[i])); + printf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i])); continue; } /* end if */ if( strcmp(wdata[i],rdata[i]) != 0 ) { diff --git a/test/tvltypes.c b/test/tvltypes.c index e20aefc..dbedf2f 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -62,10 +62,10 @@ void *test_vltypes_alloc_custom(size_t size, void *info) * This weird contortion is required on the DEC Alpha to keep the * alignment correct - QAK */ - extra=MAX(sizeof(void *),sizeof(int)); + extra=MAX(sizeof(void *),sizeof(size_t)); if((ret_value=HDmalloc(extra+size))!=NULL) { - *(int *)ret_value=size; + *(size_t *)ret_value=size; *mem_used+=size; } /* end if */ ret_value=((unsigned char *)ret_value)+extra; @@ -90,11 +90,11 @@ void test_vltypes_free_custom(void *_mem, void *info) * This weird contortion is required on the DEC Alpha to keep the * alignment correct - QAK */ - extra=MAX(sizeof(void *),sizeof(int)); + extra=MAX(sizeof(void *),sizeof(size_t)); if(_mem!=NULL) { mem=((unsigned char *)_mem)-extra; - *mem_used-=*(int *)mem; + *mem_used-=*(size_t *)mem; HDfree(mem); } /* end if */ } |