summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-10-15 19:16:05 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-10-15 19:16:05 (GMT)
commit308880e894e4efa447b4f714ce75376c456abafa (patch)
tree6e42a34bdc6fb9e73b36af784cd9d0c8e67115ec /tools
parentfebb17322b3082e2f4f731a3fb24adf0d54dbea1 (diff)
downloadhdf5-308880e894e4efa447b4f714ce75376c456abafa.zip
hdf5-308880e894e4efa447b4f714ce75376c456abafa.tar.gz
hdf5-308880e894e4efa447b4f714ce75376c456abafa.tar.bz2
[svn-r24293] Bring revisions #24058 - #24098 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5import/h5import.c112
-rw-r--r--tools/h5repack/h5repack_verify.c4
-rw-r--r--tools/misc/h5cc.in10
3 files changed, 112 insertions, 14 deletions
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 7038a95..a10ef24 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -273,7 +273,6 @@ static int gtoken(char *s)
* identify the token type
*/
if (s[0] == '-') { /* option name (or negative number) */
- token = ERR;
len = HDstrlen(&s[1]);
switch (s[1]) {
case 'o':
@@ -310,6 +309,9 @@ static int gtoken(char *s)
if (!HDstrncmp("size", &s[1], len))
token = OPT_s;
break;
+ default:
+ token = ERR; /* not a supported option tag */
+ break;
}
if (token == ERR)
@@ -3386,6 +3388,11 @@ hid_t createOutputDataType(struct Input *in)
{
hid_t new_type = (-1);
const char *err1 = "Invalid value for output class.\n";
+ const char *err2 = "Invalid value for output size.\n";
+ const char *err3 = "Invalid value for output byte order.\n";
+ const char *err4 = "Invalid value for output architecture.\n";
+ const char *err5 = "STD not supported for float.\n";
+ const char *err6 = "IEEE not supported for INT.\n";
switch (in->outputClass) {
case 0:
@@ -3407,6 +3414,10 @@ hid_t createOutputDataType(struct Input *in)
case 64:
new_type = H5Tcopy(H5T_NATIVE_LLONG);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
switch (in->outputByteOrder) {
case -1: /* default */
@@ -3418,6 +3429,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
H5Tset_order(new_type, H5T_ORDER_LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3433,6 +3448,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_I8LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3446,6 +3465,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_I16LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3459,6 +3482,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_I32LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3472,11 +3499,22 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_I64LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
break;
+ default:
+ (void) HDfprintf(stderr, "%s", err4);
+ return (-1);
}
break;
@@ -3491,6 +3529,10 @@ hid_t createOutputDataType(struct Input *in)
case 64:
new_type = H5Tcopy(H5T_NATIVE_DOUBLE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
switch (in->outputByteOrder) {
case -1: /* DEFAULT */
@@ -3502,12 +3544,16 @@ hid_t createOutputDataType(struct Input *in)
case 1:
H5Tset_order(new_type, H5T_ORDER_LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
case 1:
- /* STD not supported for float */
- break;
+ (void) HDfprintf(stderr, "%s", err5);
+ return (-1);
case 2:
switch (in->outputSize) {
@@ -3521,6 +3567,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_IEEE_F32LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3534,11 +3584,22 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_IEEE_F64LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
break;
+ default:
+ (void) HDfprintf(stderr, "%s", err4);
+ return (-1);
}
break;
@@ -3561,6 +3622,10 @@ hid_t createOutputDataType(struct Input *in)
case 64:
new_type = H5Tcopy(H5T_NATIVE_ULLONG);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
switch (in->outputByteOrder) {
case -1: /* Default */
@@ -3572,6 +3637,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
H5Tset_order(new_type, H5T_ORDER_LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3587,6 +3656,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_U8LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3600,6 +3673,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_U16LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3613,6 +3690,10 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_U32LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
@@ -3626,17 +3707,27 @@ hid_t createOutputDataType(struct Input *in)
case 1:
new_type = H5Tcopy(H5T_STD_U64LE);
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err3);
+ return (-1);
}
break;
+
+ default:
+ (void) HDfprintf(stderr, "%s", err2);
+ return (-1);
}
break;
case 2:
- /* IEEE not supported for INT */
- break;
+ (void) HDfprintf(stderr, "%s", err6);
+ return (-1);
+ default:
+ (void) HDfprintf(stderr, "%s", err4);
+ return (-1);
}
-
break;
default:
@@ -3650,6 +3741,7 @@ hid_t createInputDataType(struct Input *in)
{
hid_t new_type = (-1);
const char *err1 = "Invalid value for input class.\n";
+ const char *err2 = "Invalid value for output size.\n";
switch (in->inputClass) {
case 0:
@@ -3672,7 +3764,7 @@ hid_t createInputDataType(struct Input *in)
break;
default:
- (void) HDfprintf(stderr, "%s", err1);
+ (void) HDfprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -3690,12 +3782,14 @@ hid_t createInputDataType(struct Input *in)
break;
default:
- (void) HDfprintf(stderr, "%s", err1);
+ (void) HDfprintf(stderr, "%s", err2);
return (-1);
}
break;
case 5:
+ (void) HDfprintf(stderr, "%s", err1);
+ return (-1);
break;
case 6:
@@ -3718,7 +3812,7 @@ hid_t createInputDataType(struct Input *in)
break;
default:
- (void) HDfprintf(stderr, "%s", err1);
+ (void) HDfprintf(stderr, "%s", err2);
return (-1);
}
break;
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index 47cba5b..a57295b 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -676,7 +676,9 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter)
break;
-
+ default:
+ /* filter has no local values */
+ break;
} /* switch */
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index f62c66f..da1a26d 100644
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -132,9 +132,10 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries [default when built with"
- echo " disable-static]"
- echo " -noshlib Compile with static HDF5 libraries [default when static available]"
+ echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built"
+ echo " without static libraries]"
+ echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built"
+ echo " with static libraries]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -148,7 +149,8 @@ usage() {
echo " HDF5_CC - use a different C compiler"
echo " HDF5_CLINKER - use a different linker"
echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library"
- echo " [default: no]"
+ echo " [default: no except when built with only"
+ echo " shared libraries]"
echo " "
echo " You can also add or change paths and flags to the compile line using"
echo " the following environment varibles or by assigning them to their counterparts"