mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-06 14:56:51 +08:00
[svn-r23932] Changes applied to eliminate several compiler warnings in the test directory in files:
dt_arith.c filter_fail.c big.c dynlib2.c dynlib3.c Also an HDassert(0 && "Unknown type"); statement was added to all 29 combinations of case OTHER: default: See crucible review HDF5-145 for more details.
This commit is contained in:
parent
dad8a4ddef
commit
a195bb78b9
@ -393,6 +393,10 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n)
|
||||
HDfprintf(stdout, "Unexpected file size of NOFILE\n");
|
||||
goto error;
|
||||
break;
|
||||
|
||||
default:
|
||||
HDassert(0 && "Invalid test size.");
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -604,7 +608,6 @@ usage(void)
|
||||
int testvfd(vfd_t vfd)
|
||||
{
|
||||
hid_t fapl=-1;
|
||||
hsize_t family_size;
|
||||
char filename[1024];
|
||||
fsizes_t testsize;
|
||||
|
||||
|
@ -1853,6 +1853,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_UCHAR==dst_type) {
|
||||
@ -1903,6 +1904,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_SHORT==dst_type) {
|
||||
@ -1954,6 +1956,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_USHORT==dst_type) {
|
||||
@ -2004,6 +2007,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_INT==dst_type) {
|
||||
@ -2054,6 +2058,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_UINT==dst_type) {
|
||||
@ -2104,6 +2109,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_LONG==dst_type) {
|
||||
@ -2154,6 +2160,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_ULONG==dst_type) {
|
||||
@ -2204,6 +2211,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_LLONG==dst_type) {
|
||||
@ -2254,6 +2262,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_ULLONG==dst_type) {
|
||||
@ -2304,6 +2313,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2482,6 +2492,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2535,6 +2546,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2578,6 +2590,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3867,6 +3880,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (FLT_DOUBLE==dst_type) {
|
||||
@ -3919,6 +3933,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
#if H5_SIZEOF_LONG_DOUBLE !=0
|
||||
@ -3972,6 +3987,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case FLT_LDOUBLE:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -4004,6 +4020,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_UCHAR==dst_type) {
|
||||
@ -4035,6 +4052,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_SHORT==dst_type) {
|
||||
@ -4066,6 +4084,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_USHORT==dst_type) {
|
||||
@ -4097,6 +4116,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_INT==dst_type) {
|
||||
@ -4128,6 +4148,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_UINT==dst_type) {
|
||||
@ -4159,6 +4180,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_LONG==dst_type) {
|
||||
@ -4190,6 +4212,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_ULONG==dst_type) {
|
||||
@ -4221,6 +4244,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_LLONG==dst_type) {
|
||||
@ -4252,6 +4276,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
} else if (INT_ULLONG==dst_type) {
|
||||
@ -4283,6 +4308,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
case INT_ULLONG:
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4549,6 +4575,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
break;
|
||||
#endif
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4612,6 +4640,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
break;
|
||||
#endif
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4662,6 +4692,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
break;
|
||||
#endif
|
||||
case OTHER:
|
||||
default:
|
||||
HDassert(0 && "Unknown type");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,9 @@ H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
|
||||
if(cd_nelmts > 0)
|
||||
return(0);
|
||||
|
||||
/* Assignment to eliminate unused parameter warning. */
|
||||
cd_values = cd_values;
|
||||
|
||||
if(flags & H5Z_FLAG_REVERSE) { /*read*/
|
||||
/* Divide the original value with MULTIPLIER */
|
||||
while(buf_left > 0) {
|
||||
|
@ -71,6 +71,9 @@ H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
|
||||
if(cd_nelmts > 0)
|
||||
return(0);
|
||||
|
||||
/* Assignment to eliminate unused parameter warning. */
|
||||
cd_values = cd_values;
|
||||
|
||||
if(flags & H5Z_FLAG_REVERSE) { /*read*/
|
||||
ret_value = *buf_size = nbytes - SUFFIX_LEN;
|
||||
} /* end if */
|
||||
|
@ -65,8 +65,8 @@ const H5Z_class2_t H5Z_FAIL_TEST[1] = {{
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static size_t
|
||||
filter_fail(unsigned int flags, size_t cd_nelmts,
|
||||
const unsigned int *cd_values, size_t nbytes,
|
||||
filter_fail(unsigned int flags, size_t UNUSED cd_nelmts,
|
||||
const unsigned int UNUSED *cd_values, size_t nbytes,
|
||||
size_t *buf_size, void **buf)
|
||||
{
|
||||
int *dst = (int*)(*buf);
|
||||
|
Loading…
Reference in New Issue
Block a user