summaryrefslogtreecommitdiffstats
path: root/test/enum.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-10-21 03:44:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-10-21 03:44:32 (GMT)
commit8430e2d4dea5015e1d71ae518bbd98a1aa06363b (patch)
tree48367b471bbac3ae1bc6c9eff5f8410b391ab014 /test/enum.c
parent961a24ac3c18614850f998d7391728164090d1d6 (diff)
downloadhdf5-8430e2d4dea5015e1d71ae518bbd98a1aa06363b.zip
hdf5-8430e2d4dea5015e1d71ae518bbd98a1aa06363b.tar.gz
hdf5-8430e2d4dea5015e1d71ae518bbd98a1aa06363b.tar.bz2
[svn-r22935] Description:
Clean up a few warnings and minor code issues during review of enum -> int/float conversion changes. Tested on: Mac OSX/64 10.8.2 (amazon) w/debug (too minor to require h5committest)
Diffstat (limited to 'test/enum.c')
-rw-r--r--test/enum.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/enum.c b/test/enum.c
index c0526d8..9178a2b 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -134,7 +134,7 @@ test_conv(hid_t file)
static c_e1 data1[]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED,
E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,
- E1_RED, E1_WHITE, 0, -1, -2};
+ E1_RED, E1_WHITE, (c_e1)0, (c_e1)-1, (c_e1)-2};
c_e1 data2[NELMTS(data1)];
short data_short[NELMTS(data1)];
int data_int[NELMTS(data1)];
@@ -178,7 +178,7 @@ test_conv(hid_t file)
if(H5Dread(dset, H5T_NATIVE_SHORT, space, space, H5P_DEFAULT, data_short) < 0) FAIL_STACK_ERROR
for(i = 0; i < (size_t)ds_size[0]; i++)
- if(data1[i] != data_short[i]) {
+ if((short)data1[i] != data_short[i]) {
H5_FAILED();
printf(" 2. data1[%lu]=%d, data_short[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
@@ -190,7 +190,7 @@ test_conv(hid_t file)
if(H5Dread(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, data_double) < 0) FAIL_STACK_ERROR
for(i = 0; i < (size_t)ds_size[0]; i++)
- if(data1[i] != (int)data_double[i]) {
+ if(data1[i] != (unsigned)data_double[i]) {
H5_FAILED();
printf(" 3. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
@@ -212,7 +212,7 @@ test_conv(hid_t file)
if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, data_int) < 0) FAIL_STACK_ERROR
for(i = 0; i < (size_t)ds_size[0]; i++)
- if(data1[i] != data_int[i]) {
+ if((int)data1[i] != data_int[i]) {
H5_FAILED();
printf(" 4. data1[%lu]=%d, data_int[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),
@@ -234,7 +234,7 @@ test_conv(hid_t file)
if(H5Dread(dset, H5T_NATIVE_DOUBLE, space, space, H5P_DEFAULT, data_double) < 0) FAIL_STACK_ERROR
for(i = 0; i < (size_t)ds_size[0]; i++)
- if(data1[i] != (int)data_double[i]) {
+ if(data1[i] != (unsigned)data_double[i]) {
H5_FAILED();
printf(" 5. data1[%lu]=%d, data_double[%lu]=%d (should be same)\n",
(unsigned long)i, (int)(data1[i]),