summaryrefslogtreecommitdiffstats
path: root/tools/h5import
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
commitd2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch)
treea066f01361afaf5df457cef612bb0bb9fd80fe18 /tools/h5import
parentee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff)
downloadhdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to fixed and extensible array dataset chunk indexing code to accommodate changes to private APIs in those interfaces. Also, other adjustments to source code and expected output in response to changes on the trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools/h5import')
-rw-r--r--tools/h5import/Makefile.am2
-rwxr-xr-xtools/h5import/Makefile.in23
-rwxr-xr-xtools/h5import/h5import.c192
-rwxr-xr-xtools/h5import/h5importtest.c2
4 files changed, 113 insertions, 106 deletions
diff --git a/tools/h5import/Makefile.am b/tools/h5import/Makefile.am
index 2202f5f..49f4f71 100644
--- a/tools/h5import/Makefile.am
+++ b/tools/h5import/Makefile.am
@@ -35,7 +35,7 @@ SCRIPT_DEPEND=h5import$(EXEEXT)
bin_PROGRAMS=h5import
# Add h5import specific linker flags here
-h5import_LDFLAGS = $(LT_STATIC_EXEC)
+h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the main hdf5 library and the tools library
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index f9e88ae..15fcf90 100755
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -103,6 +103,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -116,21 +126,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -153,7 +160,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -361,7 +368,7 @@ check_SCRIPT = h5importtestutil.sh
SCRIPT_DEPEND = h5import$(EXEEXT)
# Add h5import specific linker flags here
-h5import_LDFLAGS = $(LT_STATIC_EXEC)
+h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the main hdf5 library and the tools library
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 933754e..3818829 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
case ERR: /* command syntax error */
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
usage(argv[0]);
goto err;
}
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
if (FALSE == outfile_named)
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
}
@@ -190,10 +190,10 @@ int main(int argc, char *argv[])
if (process(&opt) == -1)
goto err;
- return(0);
+ return(EXIT_SUCCESS);
err:
- (void) fprintf(stderr, err4);
- return(-1);
+ (void) fprintf(stderr, "%s", err4);
+ return(EXIT_FAILURE);
}
static int
@@ -397,7 +397,7 @@ processDataFile(char *infile, struct Input *in, FILE **strm, hid_t file_id)
break;
default:
- (void) fprintf(stderr, err10);
+ (void) fprintf(stderr, "%s", err10);
return(-1);
}
return (0);
@@ -435,7 +435,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hd", &temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_INT8)temp;
@@ -448,14 +448,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in08, sizeof(H5DT_INT8), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -469,7 +469,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hd", in16) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -481,14 +481,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in16, sizeof(H5DT_INT16), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -502,7 +502,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%d", in32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -513,14 +513,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in32, sizeof(H5DT_INT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -535,7 +535,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%s", buffer) < 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_INT64) HDstrtoll(buffer, NULL, 10);
@@ -547,21 +547,21 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in64, sizeof(H5DT_INT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
#endif /* ifndef _WIN32 */
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -598,7 +598,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hu", &temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_UINT8)temp;
@@ -611,14 +611,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in08, sizeof(H5DT_UINT8), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -632,7 +632,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hu", in16) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -643,14 +643,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in16, sizeof(H5DT_UINT16), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -664,7 +664,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%u", in32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -675,14 +675,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in32, sizeof(H5DT_UINT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -697,7 +697,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%s", buffer) < 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_UINT64) HDstrtoll(buffer, NULL, 10);
@@ -709,21 +709,21 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in64, sizeof(H5DT_UINT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
#endif /* ifndef _WIN32 */
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -756,7 +756,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%f", fp32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -771,7 +771,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%f", fp32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -784,14 +784,14 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fread((char *) fp32, sizeof(H5DT_FLOAT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -805,7 +805,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%lf", fp64) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -820,7 +820,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%lf", fp64) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -833,20 +833,20 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fread((char *) fp64, sizeof(H5DT_FLOAT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -1019,7 +1019,7 @@ allocateIntegerStorage(struct Input *in)
case 8:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT8))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1027,7 +1027,7 @@ allocateIntegerStorage(struct Input *in)
case 16:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT16))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1035,7 +1035,7 @@ allocateIntegerStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1043,13 +1043,13 @@ allocateIntegerStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1070,7 +1070,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 8:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT8))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1078,7 +1078,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 16:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT16))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1086,7 +1086,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1094,13 +1094,13 @@ static int allocateUIntegerStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1122,7 +1122,7 @@ allocateFloatStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_FLOAT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1130,13 +1130,13 @@ allocateFloatStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_FLOAT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1216,7 +1216,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
}
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err18);
+ (void) fprintf(stderr, "%s", err18);
return (-1);
}
if (parsePathInfo(&in->path, temp) == -1)
@@ -1236,7 +1236,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err18);
+ (void) fprintf(stderr, "%s", err18);
return (-1);
}
if (getInputClass(in, temp) == -1)
@@ -1267,7 +1267,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
}
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err19);
+ (void) fprintf(stderr, "%s", err19);
return (-1);
}
if (getInputSize(in, ival) == -1)
@@ -1514,7 +1514,7 @@ validateConfigurationParameters(struct Input * in)
(in->configOptionVector[DIM] != 1) ||
(in->configOptionVector[RANK] != 1))
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1524,7 +1524,7 @@ validateConfigurationParameters(struct Input * in)
(in->configOptionVector[CHUNK] == 1) ||
(in->configOptionVector[EXTEND] == 1))
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
}
@@ -1534,7 +1534,7 @@ validateConfigurationParameters(struct Input * in)
{
if (in->configOptionVector[CHUNK] != 1)
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -1543,7 +1543,7 @@ validateConfigurationParameters(struct Input * in)
if (in->outputArchitecture == 1)
if (in->outputClass == 1)
{
- (void) fprintf(stderr, err4a);
+ (void) fprintf(stderr, "%s", err4a);
return (-1);
}
@@ -1551,7 +1551,7 @@ validateConfigurationParameters(struct Input * in)
if (in->outputArchitecture == 2)
if (in->outputClass == 0)
{
- (void) fprintf(stderr, err4b);
+ (void) fprintf(stderr, "%s", err4b);
return (-1);
}
@@ -1559,14 +1559,14 @@ validateConfigurationParameters(struct Input * in)
if(in->outputSize != 32 &&
in->outputSize != 64 )
{
- (void) fprintf(stderr, err5);
+ (void) fprintf(stderr, "%s", err5);
return (-1);
}
#ifdef _WIN32
if (in->inputSize == 64 && (in->inputClass == 0 || in->inputClass == 4 || in->inputClass == 6 || in->inputClass == 7) )
{
- (void) fprintf(stderr, err6);
+ (void) fprintf(stderr, "%s", err6);
return -1;
}
#endif
@@ -1626,7 +1626,7 @@ parseDimensions(struct Input *in, char *strm)
if ((in->sizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1654,13 +1654,13 @@ getOutputClass(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputClassStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1694,7 +1694,7 @@ getOutputSize(struct Input *in, FILE** strm)
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1704,7 +1704,7 @@ getOutputSize(struct Input *in, FILE** strm)
in->outputSize = ival;
return (0);
}
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return(-1);
}
@@ -1716,7 +1716,7 @@ getInputClass(struct Input *in, char * temp)
if ((kindex = InputClassStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1757,7 +1757,7 @@ getInputSize(struct Input *in, int ival)
in->inputSize = ival;
return (0);
}
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return(-1);
}
@@ -1771,7 +1771,7 @@ getRank(struct Input *in, FILE** strm)
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if (ival >=MIN_NUM_DIMENSION && ival <=MAX_NUM_DIMENSION )
@@ -1780,7 +1780,7 @@ getRank(struct Input *in, FILE** strm)
return (0);
}
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return(-1);
}
@@ -1797,7 +1797,7 @@ getDimensionSizes(struct Input *in, FILE **strm)
if ((in->sizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1806,7 +1806,7 @@ getDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
return (0);
@@ -1825,7 +1825,7 @@ getChunkedDimensionSizes(struct Input *in, FILE **strm)
if ((in->sizeOfChunk =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1834,14 +1834,14 @@ getChunkedDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
for (i=0; i<in->rank; i++)
if (in->sizeOfChunk[i] > in->sizeOfDimension[i])
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
return (0);
@@ -1860,7 +1860,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if ((in->maxsizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1874,7 +1874,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1883,7 +1883,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if (in->maxsizeOfDimension[i] != H5S_UNLIMITED)
if (in->maxsizeOfDimension[i] < in->sizeOfDimension[i])
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -1900,13 +1900,13 @@ getOutputArchitecture(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputArchStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1943,13 +1943,13 @@ getOutputByteOrder(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1980,13 +1980,13 @@ getCompressionType(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = CompressionTypeStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2027,20 +2027,20 @@ getCompressionParameter(struct Input *in, FILE** strm)
case 0: /* GZIP */
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if (ival <0 || ival > 9)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
in->compressionParam = ival;
return (0);
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -2053,7 +2053,7 @@ getExternalFilename(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2370,7 +2370,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -2447,7 +2447,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -2555,7 +2555,7 @@ process(struct Options *opt)
/* creating the external file if it doesnt exist */
if ((extfile = HDfopen(in->externFilename, "ab")) == NULL)
{
- (void) fprintf(stderr, err4);
+ (void) fprintf(stderr, "%s", err4);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -2575,7 +2575,7 @@ process(struct Options *opt)
H5E_BEGIN_TRY {
/* create data set */
if((dataset = H5Dcreate2(handle, in->path.group[j], outtype, dataspace, H5P_DEFAULT, proplist, H5P_DEFAULT)) < 0) {
- (void)fprintf(stderr, err5);
+ (void)fprintf(stderr, "%s", err5);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -2587,7 +2587,7 @@ process(struct Options *opt)
/* write dataset */
if(H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) {
- (void) fprintf(stderr, err6);
+ (void) fprintf(stderr, "%s", err6);
H5Dclose(dataset);
H5Pclose(proplist);
H5Sclose(dataspace);
diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c
index dd1a2be..9c839a3 100755
--- a/tools/h5import/h5importtest.c
+++ b/tools/h5import/h5importtest.c
@@ -370,6 +370,6 @@ main(void)
- return (0);
+ return (EXIT_SUCCESS);
}