diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp index 7525c5f97fa..0edfe0ee23e 100644 --- a/c++/test/tarray.cpp +++ b/c++/test/tarray.cpp @@ -178,9 +178,9 @@ test_array_compound_array() // Check the array dimensions for (ii = 0; ii < ndims; ii++) if (rdims1[ii] != tdims1[ii]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii, - rdims1[ii], ii, tdims1[ii]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + ii, rdims1[ii], ii, tdims1[ii]); continue; } // end if @@ -197,9 +197,9 @@ test_array_compound_array() // Check the array dimensions for (ii = 0; ii < ndims; ii++) if (rdims1[ii] != tdims1[ii]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii, - rdims1[ii], ii, tdims1[ii]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + ii, rdims1[ii], ii, tdims1[ii]); continue; } // end if @@ -248,9 +248,9 @@ test_array_compound_array() // Check the array dimensions for (ii = 0; ii < ndims; ii++) if (rdims1[ii] != tdims1[ii]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%lld, tdims1[%d]=%lld\n", ii, - rdims1[ii], ii, tdims1[ii]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + ii, rdims1[ii], ii, tdims1[ii]); continue; } // end if @@ -265,8 +265,9 @@ test_array_compound_array() for (idxi = 0; idxi < SPACE1_DIM1; idxi++) { for (idxj = 0; idxj < ARRAY1_DIM1; idxj++) { if (wdata[idxi][idxj].i != rdata[idxi][idxj].i) { - TestErrPrintf("Array data information doesn't match!, wdata[%lld][%lld].i=%d, " - "rdata[%lld][%lld].i=%d\n", + TestErrPrintf("Array data information doesn't match!, wdata[%" PRIuHSIZE "][%" PRIuHSIZE + "].i=%d, " + "rdata[%" PRIuHSIZE "][%" PRIuHSIZE "].i=%d\n", idxi, idxj, wdata[idxi][idxj].i, idxi, idxj, rdata[idxi][idxj].i); continue; } // end if @@ -457,11 +458,11 @@ test_array_info() // Check the array dimensions for (ii = 0; ii < ndims; ii++) if (rdims1[ii] != tdims1[ii]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=z%llu\n", ii, - rdims1[ii], ii, tdims1[ii]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + ii, rdims1[ii], ii, tdims1[ii]); continue; - } // end if + } } // Close all diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp index 228b787f7f0..fe2bfaaefb5 100644 --- a/c++/test/tattr.cpp +++ b/c++/test/tattr.cpp @@ -169,7 +169,8 @@ test_attr_basic_write() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE + "]=%d,read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1[i], i, read_data1[i]); // Create two more attributes for this dataset, but only write to one. @@ -185,7 +186,8 @@ test_attr_basic_write() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1a[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data1a[%" PRIuHSIZE + "]=%d,read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1a[i], i, read_data1[i]); // Close both attributes @@ -448,7 +450,8 @@ test_attr_rename() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu%d\n", + TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE + "]=%d,read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1[i], i, read_data1[i]); // Close attribute @@ -472,7 +475,8 @@ test_attr_rename() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1a[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1a[%llu]=%d,read_data1[%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data1a[%" PRIuHSIZE + "]=%d,read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1a[i], i, read_data1[i]); // Close attribute @@ -537,7 +541,8 @@ test_attr_basic_read() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d, read_data1[%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE + "]=%d, read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1[i], i, read_data1[i]); /* @@ -568,8 +573,9 @@ test_attr_basic_read() for (i = 0; i < ATTR2_DIM1; i++) for (j = 0; j < ATTR2_DIM2; j++) if (attr_data2[i][j] != read_data2[i][j]) { - TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, " - "read_data2[%llu][%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data2[%" PRIuHSIZE "][%" PRIuHSIZE + "]=%d, " + "read_data2[%" PRIuHSIZE "][%" PRIuHSIZE "]=%d\n", __LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]); } PASSED(); @@ -772,14 +778,17 @@ test_attr_compound_read() for (ii = 0; ii < ATTR4_DIM1; ii++) for (jj = 0; jj < ATTR4_DIM2; jj++) if (HDmemcmp(&attr_data4[ii][jj], &read_data4[ii][jj], sizeof(struct attr4_struct)) != 0) { - TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].i=%d, " - "read_data4[%llu][%llu].i=%d\n", + TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE + "].i=%d, " + "read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].i=%d\n", __LINE__, ii, jj, attr_data4[ii][jj].i, ii, jj, read_data4[ii][jj].i); - TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].d=%f, " - "read_data4[%llu][%llu].d=%f\n", + TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE + "].d=%f, " + "read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].d=%f\n", __LINE__, ii, jj, attr_data4[ii][jj].d, ii, jj, read_data4[ii][jj].d); - TestErrPrintf("%d:attribute data different: attr_data4[%llu][%llu].c=%c, " - "read_data4[%llu][%llu].c=%c\n", + TestErrPrintf("%d:attribute data different: attr_data4[%" PRIuHSIZE "][%" PRIuHSIZE + "].c=%c, " + "read_data4[%" PRIuHSIZE "][%" PRIuHSIZE "].c=%c\n", __LINE__, ii, jj, attr_data4[ii][jj].c, ii, jj, read_data4[ii][jj].c); } /* end if */ @@ -1042,10 +1051,10 @@ test_attr_mult_read() // Get the dims of the dataspace and verify them hsize_t dims[ATTR_MAX_DIMS]; // Attribute dimensions - int ndims = space.getSimpleExtentDims(dims); - if ((long)dims[0] != (long)ATTR1_DIM1) - TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %llu\n", __LINE__, - (int)dims[0], ATTR1_DIM1); + (void)space.getSimpleExtentDims(dims); + if (dims[0] != ATTR1_DIM1) + TestErrPrintf("%d:attribute dimensions different: dims[0]=%d, should be %" PRIuHSIZE "\n", + __LINE__, static_cast(dims[0]), ATTR1_DIM1); /* Verify Datatype */ @@ -1072,7 +1081,8 @@ test_attr_mult_read() // Verify values read in for (i = 0; i < ATTR1_DIM1; i++) if (attr_data1[i] != read_data1[i]) - TestErrPrintf("%d: attribute data different: attr_data1[%llu]=%d,read_data1[%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data1[%" PRIuHSIZE + "]=%d,read_data1[%" PRIuHSIZE "]=%d\n", __LINE__, i, attr_data1[i], i, read_data1[i]); // Verify Name @@ -1095,7 +1105,7 @@ test_attr_mult_read() verify_val(rank, ATTR2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__); // Get the dims of the dataspace and verify them - ndims = space.getSimpleExtentDims(dims); + int ndims = space.getSimpleExtentDims(dims); verify_val((long)dims[0], (long)ATTR2_DIM1, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); verify_val((long)dims[1], (long)ATTR2_DIM2, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__); @@ -1127,8 +1137,9 @@ test_attr_mult_read() for (i = 0; i < ATTR2_DIM1; i++) for (j = 0; j < ATTR2_DIM2; j++) if (attr_data2[i][j] != read_data2[i][j]) - TestErrPrintf("%d: attribute data different: attr_data2[%llu][%llu]=%d, " - "read_data2[%llu][%llu]=%d\n", + TestErrPrintf("%d: attribute data different: attr_data2[%" PRIuHSIZE "][%" PRIuHSIZE + "]=%d, " + "read_data2[%" PRIuHSIZE "][%" PRIuHSIZE "]=%d\n", __LINE__, i, j, attr_data2[i][j], i, j, read_data2[i][j]); // Verify Name @@ -1181,9 +1192,10 @@ test_attr_mult_read() for (i = 0; i < ATTR3_DIM1; i++) for (j = 0; j < ATTR3_DIM2; j++) for (k = 0; k < ATTR3_DIM3; k++) - if (attr_data3[i][j][k] != read_data3[i][j][k]) - TestErrPrintf("%d: attribute data different: attr_data3[%llu][%llu][%llu]=%f, " - "read_data3[%llu][%llu][%llu]=%f\n", + if (abs(attr_data3[i][j][k] - read_data3[i][j][k]) > DBL_EPSILON) + TestErrPrintf("%d: attribute data different: attr_data3[%" PRIuHSIZE "][%" PRIuHSIZE + "][%" PRIuHSIZE "]=%f, " + "read_data3[%" PRIuHSIZE "][%" PRIuHSIZE "][%" PRIuHSIZE "]=%f\n", __LINE__, i, j, k, attr_data3[i][j][k], i, j, k, read_data3[i][j][k]); // Verify Name diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp index 5fc82a50994..a244965310e 100644 --- a/c++/test/ttypes.cpp +++ b/c++/test/ttypes.cpp @@ -726,8 +726,11 @@ test_named() // It should be possible to define an attribute for the named type Attribute attr1 = itype.createAttribute("attr1", PredType::NATIVE_UCHAR, space); - for (i = 0; i < ds_size[0] * ds_size[1]; i++) - attr_data[0][i] = (int)i; /*tricky*/ + for (hsize_t i = 0; i < ds_size[0]; i++) { + for (hsize_t j = 0; j < ds_size[1]; j++) { + attr_data[i][j] = static_cast(i * ds_size[1] + j); + } + } attr1.write(PredType::NATIVE_UINT, attr_data); attr1.close(); diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 842cfe82523..5aa00fe4088 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -35,6 +35,10 @@ /* Define if dev_t is a scalar */ #cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@ +/* Define if your system is IBM ppc64le and cannot convert some long double + values correctly. */ +#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ + /* Define to dummy `main' function (if any) required to link to the Fortran libraries. */ #cmakedefine H5_FC_DUMMY_MAIN @H5_FC_DUMMY_MAIN@ @@ -111,7 +115,7 @@ #cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@ /* Define to 1 if you have the header file. */ -#cmakedefine H5_HAVE_CURL_H @H5_HAVE_CURL_H@ +#cmakedefine H5_HAVE_CURL_CURL_H @H5_HAVE_CURL_H@ /* Define if Darwin or Mac OS X */ #cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@ @@ -191,9 +195,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_HDFS_H @H5_HAVE_HDFS_H@ -/* Define if the compiler understands inline */ -#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@ - /* Define if parallel library will contain instrumentation to detect correct optimization operation */ #cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@ @@ -340,16 +341,13 @@ /* Define to 1 if you have the `sigsetjmp' function. */ #cmakedefine H5_HAVE_SIGSETJMP @H5_HAVE_SIGSETJMP@ -/* Define to 1 if you have the `snprintf' function. */ -#cmakedefine H5_HAVE_SNPRINTF @H5_HAVE_SNPRINTF@ - /* Define to 1 if you have the `srandom' function. */ #cmakedefine H5_HAVE_SRANDOM @H5_HAVE_SRANDOM@ /* Define to 1 if you have the `stat64' function. */ #cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@ -/* Define if `struct stat' has the `st_blocks' field */ +/* Define if struct stat has the st_blocks field */ #cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@ /* Define to 1 if you have the header file. */ @@ -367,12 +365,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_STRING_H @H5_HAVE_STRING_H@ -/* Define to 1 if you have the `strtoll' function. */ -#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@ - -/* Define to 1 if you have the `strtoull' function. */ -#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@ - /* Define if struct text_info is defined */ #cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@ @@ -382,9 +374,6 @@ /* Define to 1 if you have the `symlink' function. */ #cmakedefine H5_HAVE_SYMLINK @H5_HAVE_SYMLINK@ -/* Define to 1 if you have the `system' function. */ -#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@ - /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_SYS_FILE_H @H5_HAVE_SYS_FILE_H@ @@ -438,9 +427,6 @@ /* Define to 1 if you have the `vasprintf' function. */ #cmakedefine H5_HAVE_VASPRINTF @H5_HAVE_VASPRINTF@ -/* Define to 1 if you have the `vsnprintf' function. */ -#cmakedefine H5_HAVE_VSNPRINTF @H5_HAVE_VSNPRINTF@ - /* Define to 1 if you have the `waitpid' function. */ #cmakedefine H5_HAVE_WAITPID @H5_HAVE_WAITPID@ @@ -462,12 +448,6 @@ /* Define to 1 if you have the `_scrsize' function. */ #cmakedefine H5_HAVE__SCRSIZE @H5_HAVE__SCRSIZE@ -/* Define if the compiler understands __inline */ -#cmakedefine H5_HAVE___INLINE @H5_HAVE___INLINE@ - -/* Define if the compiler understands __inline__ */ -#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@ - /* Define if the library will ignore file locks when disabled */ #cmakedefine H5_IGNORE_DISABLED_FILE_LOCKS @H5_IGNORE_DISABLED_FILE_LOCKS@ @@ -490,9 +470,6 @@ with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ -/* Define if your system is power6 and cannot convert some long double values. */ -#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ - /* Define to the sub-directory where libtool stores uninstalled libraries. */ #cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@ @@ -708,15 +685,15 @@ /* Define to 1 if you can safely include both and . */ #cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@ +/* Define using v1.10 public API symbols by default */ +#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@ + /* Define using v1.6 public API symbols by default */ #cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@ /* Define using v1.8 public API symbols by default */ #cmakedefine H5_USE_18_API_DEFAULT @H5_USE_18_API_DEFAULT@ -/* Define using v1.10 public API symbols by default */ -#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@ - /* Define if the library will use file locking */ #cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index d44ede7ea6e..5c3cba8cae1 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -72,7 +72,6 @@ if (WINDOWS) set (${HDF_PREFIX}_HAVE_WIN32_API 1) set (${HDF_PREFIX}_HAVE_LIBM 1) set (${HDF_PREFIX}_HAVE_STRDUP 1) - set (${HDF_PREFIX}_HAVE_SYSTEM 1) set (${HDF_PREFIX}_HAVE_LONGJMP 1) if (NOT MINGW) set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1) @@ -499,26 +498,15 @@ CHECK_FUNCTION_EXISTS (siglongjmp ${HDF_PREFIX}_HAVE_SIGLONGJMP) CHECK_FUNCTION_EXISTS (sigsetjmp ${HDF_PREFIX}_HAVE_SIGSETJMP) CHECK_FUNCTION_EXISTS (sigprocmask ${HDF_PREFIX}_HAVE_SIGPROCMASK) -CHECK_FUNCTION_EXISTS (snprintf ${HDF_PREFIX}_HAVE_SNPRINTF) CHECK_FUNCTION_EXISTS (srandom ${HDF_PREFIX}_HAVE_SRANDOM) CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP) -CHECK_FUNCTION_EXISTS (strtoll ${HDF_PREFIX}_HAVE_STRTOLL) -CHECK_FUNCTION_EXISTS (strtoull ${HDF_PREFIX}_HAVE_STRTOULL) CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK) -CHECK_FUNCTION_EXISTS (system ${HDF_PREFIX}_HAVE_SYSTEM) CHECK_FUNCTION_EXISTS (tmpfile ${HDF_PREFIX}_HAVE_TMPFILE) CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF) CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF) CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID) -CHECK_FUNCTION_EXISTS (vsnprintf ${HDF_PREFIX}_HAVE_VSNPRINTF) -if (MINGW OR NOT WINDOWS) - if (${HDF_PREFIX}_HAVE_VSNPRINTF) - HDF_FUNCTION_TEST (VSNPRINTF_WORKS) - endif () -endif () - #----------------------------------------------------------------------------- # sigsetjmp is special; may actually be a macro #----------------------------------------------------------------------------- @@ -609,14 +597,6 @@ if (WINDOWS) endif () endif () -#----------------------------------------------------------------------------- -# Determine how 'inline' is used -#----------------------------------------------------------------------------- -foreach (inline_test inline __inline__ __inline) - string (TOUPPER ${inline_test} INLINE_TEST_MACRO) - HDF_FUNCTION_TEST (HAVE_${INLINE_TEST_MACRO}) -endforeach () - #----------------------------------------------------------------------------- # Check how to print a Long Long integer #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index 0c3b7b75e08..365931b7822 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -64,31 +64,6 @@ main () #endif -#ifdef VSNPRINTF_WORKS -#include -#include -#include - -int test_vsnprintf(const char *fmt,...) -{ - va_list ap; - char *s = malloc(16); - int ret; - - va_start(ap, fmt); - ret=vsnprintf(s,16,"%s",ap); - va_end(ap); - - return(ret!=42 ? 1 : 0); -} - -int main(void) -{ - return(test_vsnprintf("%s","A string that is longer than 16 characters")); -} -#endif - - #ifdef HAVE_ATTRIBUTE #if 0 @@ -356,20 +331,3 @@ int main () } #endif /* HAVE_IOEO */ - -#if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) -#ifndef __cplusplus -#if defined( HAVE_INLINE ) -# define INLINE_KW inline -#elif defined ( HAVE___INLINE__ ) -# define INLINE_KW __inline__ -#elif defined ( HAVE___INLINE ) -# define INLINE_KW __inline -#endif /* HAVE_INLINE */ -typedef int foo_t; -static INLINE_KW foo_t static_foo () { return 0; } -INLINE_KW foo_t foo () {return 0; } -int main(void) { return 0; } -#endif /* __cplusplus */ -#endif /* defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) */ - diff --git a/config/commence.am b/config/commence.am index ef2bd97290a..a87e7df2b46 100644 --- a/config/commence.am +++ b/config/commence.am @@ -45,7 +45,7 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la docdir = $(exec_prefix)/doc # Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by Gnu at +# has been removed. According to the official description of DESTDIR by GNU at # http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is # prepended to the normal and complete install path that it precedes for the # purpose of installing in a temporary directory which is useful for building diff --git a/configure.ac b/configure.ac index d233323b069..16409d83bc9 100644 --- a/configure.ac +++ b/configure.ac @@ -449,15 +449,9 @@ esac ## Data types and their sizes. ## AC_TYPE_OFF_T -AC_CHECK_TYPE([size_t], [], - [AC_DEFINE_UNQUOTED([size_t], [unsigned long], - [Define to `unsigned long' if does not define.])]) AC_CHECK_TYPE([ssize_t], [], [AC_DEFINE_UNQUOTED([ssize_t], [long], [Define to `long' if does not define.])]) -AC_CHECK_TYPE([ptrdiff_t], [], - [AC_DEFINE_UNQUOTED([ptrdiff_t], [long], - [Define to `long' if does not define.])]) AC_C_BIGENDIAN AC_CHECK_SIZEOF([char]) AC_CHECK_SIZEOF([short]) @@ -1216,8 +1210,6 @@ AC_CHECK_LIB([dl], [dlopen]) ## ---------------------------------------------------------------------- ## Check for system header files. ## -AC_HEADER_STDC -AC_HEADER_TIME ## Unix AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h]) @@ -1338,16 +1330,6 @@ CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" ## Checkpoint the cache AC_CACHE_SAVE -## Write the confdefs.h header for checking sizes -cat >>confdefs.h <<\EOF -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#include -EOF - AC_CHECK_SIZEOF( [int8_t]) AC_CHECK_SIZEOF( [uint8_t]) AC_CHECK_SIZEOF( [int_least8_t]) @@ -1376,12 +1358,13 @@ AC_CHECK_SIZEOF([uint_least64_t]) AC_CHECK_SIZEOF( [int_fast64_t]) AC_CHECK_SIZEOF( [uint_fast64_t]) -AC_CHECK_SIZEOF([bool]) + +AC_CHECK_SIZEOF([bool], [], [#include ]) AC_CHECK_SIZEOF([off_t]) AC_CHECK_SIZEOF([ptrdiff_t]) AC_CHECK_SIZEOF([size_t]) AC_CHECK_SIZEOF([ssize_t]) -AC_CHECK_SIZEOF([time_t]) +AC_CHECK_SIZEOF([time_t], [], [#include ]) ## Checkpoint the cache AC_CACHE_SAVE @@ -2016,37 +1999,13 @@ AC_CHECK_FUNCS([alarm clock_gettime difftime fcntl flock fork frexpf]) AC_CHECK_FUNCS([frexpl gethostname getrusage gettimeofday]) AC_CHECK_FUNCS([lstat rand_r random setsysinfo]) AC_CHECK_FUNCS([signal longjmp setjmp siglongjmp sigsetjmp sigprocmask]) -AC_CHECK_FUNCS([snprintf srandom strdup symlink system]) -AC_CHECK_FUNCS([strtoll strtoull]) -AC_CHECK_FUNCS([tmpfile asprintf vasprintf vsnprintf waitpid]) +AC_CHECK_FUNCS([srandom strdup symlink]) +AC_CHECK_FUNCS([tmpfile asprintf vasprintf waitpid]) AC_CHECK_FUNCS([roundf lroundf llroundf round lround llround]) ## ---------------------------------------------------------------------- ## Check compiler characteristics ## -AC_C_CONST - -AC_MSG_CHECKING([if the compiler understands __inline__]) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([[static __inline__ void f(void){return;};]])], - [AC_DEFINE([HAVE___INLINE__], [1], [Define if the compiler understands __inline__]) AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([if the compiler understands __inline]) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([[static __inline void f(void){return;};]])], - [AC_DEFINE([HAVE___INLINE], [1], [Define if the compiler understands __inline]) AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] -) - -AC_MSG_CHECKING([if the compiler understands inline]) -AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([[static inline void f(void){return;};]])], - [AC_DEFINE([HAVE_INLINE], [1], [Define if the compiler understands inline]) AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])] -) - AC_MSG_CHECKING([for __attribute__ extension]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int __attribute__((unused)) x]])], [AC_DEFINE([HAVE_ATTRIBUTE], [1], diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp index 0f47b0d7aea..5f41e2692a9 100644 --- a/hl/c++/src/H5PacketTable.cpp +++ b/hl/c++/src/H5PacketTable.cpp @@ -28,6 +28,14 @@ /* PacketTable superclass */ /********************************/ +/* Null constructor + * Sets table_id to "invalid" + */ +PacketTable::PacketTable() +{ + table_id = H5I_INVALID_HID; +} + /* "Open" Constructor * Opens an existing packet table, which can contain either fixed-length or * variable-length packets. diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index a73b4c95220..eae66f182d0 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -31,12 +31,9 @@ class H5_HLCPPDLL PacketTable { public: /* Null constructor - * Sets table_id to "invalid" + * Sets table_id to H5I_INVALID_HID */ - PacketTable() - { - table_id = H5I_BADID; - } + PacketTable(); /* "Open" Constructor * Opens an existing packet table, which can contain either fixed-length or diff --git a/src/H5Gint.c b/src/H5Gint.c index 3ef95323020..38a3241a772 100644 --- a/src/H5Gint.c +++ b/src/H5Gint.c @@ -38,6 +38,7 @@ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ +#include "H5SLprivate.h" /* Skip lists */ /****************/ /* Local Macros */ diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 484715eb682..b7047575c9c 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -35,7 +35,6 @@ #include "H5HFprivate.h" /* Fractal heaps */ #include "H5HLprivate.h" /* Local Heaps */ #include "H5Oprivate.h" /* Object headers */ -#include "H5SLprivate.h" /* Skip lists */ /**************************/ /* Package Private Macros */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index a18d10163e5..0bedaff38b3 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -34,7 +34,6 @@ #include "H5B2private.h" /* v2 B-trees */ #include "H5FLprivate.h" /* Free Lists */ #include "H5FSprivate.h" /* Free space manager */ -#include "H5SLprivate.h" /* Skip lists */ /**************************/ /* Package Private Macros */ diff --git a/src/H5private.h b/src/H5private.h index b31ec7827ee..56fdf3db293 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -26,21 +26,6 @@ #include "H5public.h" /* Include Public Definitions */ -/* include the pthread header */ -#ifdef H5_HAVE_THREADSAFE -#ifdef H5_HAVE_WIN32_API -#ifndef H5_HAVE_WIN_THREADS -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN_THREADS */ -#else /* H5_HAVE_WIN32_API */ -#ifdef H5_HAVE_PTHREAD_H -#include -#endif /* H5_HAVE_PTHREAD_H */ -#endif /* H5_HAVE_WIN32_API */ -#endif /* H5_HAVE_THREADSAFE */ - #include #include #include @@ -49,53 +34,35 @@ #include #include #include +#include #include #include #include +#include -/* - * If _POSIX_VERSION is defined in unistd.h then this system is Posix.1 - * compliant. Otherwise all bets are off. - */ +/* POSIX headers */ #ifdef H5_HAVE_UNISTD_H -#include +#include #include -#endif -#ifdef _POSIX_VERSION +#include +#include #include -#include #endif -#include +/* Include the Pthreads header, if necessary */ +#if defined(H5_HAVE_THREADSAFE) && defined(H5_HAVE_PTHREAD_H) +#include +#endif /* - * The `struct stat' data type for stat() and fstat(). This is a Posix file - * but often apears on non-Posix systems also. The `struct stat' is required - * for hdf5 to compile, although only a few fields are actually used. + * The `struct stat' data type for stat() and fstat(). This is a POSIX file + * but often apears on non-POSIX systems also. The `struct stat' is required + * for HDF5 to compile, although only a few fields are actually used. */ #ifdef H5_HAVE_SYS_STAT_H #include #endif -/* - * If a program may include both `time.h' and `sys/time.h' then - * TIME_WITH_SYS_TIME is defined (see AC_HEADER_TIME in configure.ac). - * On some older systems, `sys/time.h' includes `time.h' but `time.h' is not - * protected against multiple inclusion, so programs should not explicitly - * include both files. This macro is useful in programs that use, for example, - * `struct timeval' or `struct timezone' as well as `struct tm'. It is best - * used in conjunction with `HAVE_SYS_TIME_H', whose existence is checked - * by `AC_CHECK_HEADERS(sys/time.h)' in configure.ac. - */ -#if defined(H5_TIME_WITH_SYS_TIME) -#include -#include -#elif defined(H5_HAVE_SYS_TIME_H) -#include -#else -#include -#endif - /* * Longjumps are used to detect alignment constrants */ @@ -1449,11 +1416,7 @@ H5_DLL void HDsrand(unsigned int seed); #define HDstrtol(S, R, N) strtol(S, R, N) #endif /* HDstrtol */ #ifndef HDstrtoll -#ifdef H5_HAVE_STRTOLL #define HDstrtoll(S, R, N) strtoll(S, R, N) -#else -H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); -#endif /* H5_HAVE_STRTOLL */ #endif /* HDstrtoll */ #ifndef HDstrtoul #define HDstrtoul(S, R, N) strtoul(S, R, N) @@ -1551,7 +1514,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); #ifdef H5_HAVE_VASPRINTF #define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) #else -H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); +H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); #endif /* H5_HAVE_VASPRINTF */ #endif /* HDvasprintf */ #ifndef HDva_arg diff --git a/src/H5system.c b/src/H5system.c index 144e0bc6a7f..4a40a2a6c87 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -96,131 +96,6 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap) } #endif /* H5_HAVE_VASPRINTF */ -/*------------------------------------------------------------------------- - * Function: HDstrtoll - * - * Purpose: Converts the string S to an int64_t value according to the - * given BASE, which must be between 2 and 36 inclusive, or be - * the special value zero. - * - * The string must begin with an arbitrary amount of white space - * (as determined by isspace(3c)) followed by a single optional - * `+' or `-' sign. If BASE is zero or 16 the string may then - * include a `0x' or `0X' prefix, and the number will be read in - * base 16; otherwise a zero BASE is taken as 10 (decimal) - * unless the next character is a `0', in which case it is taken - * as 8 (octal). - * - * The remainder of the string is converted to an int64_t in the - * obvious manner, stopping at the first character which is not - * a valid digit in the given base. (In bases above 10, the - * letter `A' in either upper or lower case represetns 10, `B' - * represents 11, and so forth, with `Z' representing 35.) - * - * If REST is not null, the address of the first invalid - * character in S is stored in *REST. If there were no digits - * at all, the original value of S is stored in *REST. Thus, if - * *S is not `\0' but **REST is `\0' on return the entire string - * was valid. - * - * Return: Success: The result. - * - * Failure: If the input string does not contain any - * digits then zero is returned and REST points - * to the original value of S. If an overflow - * or underflow occurs then the maximum or - * minimum possible value is returned and the - * global `errno' is set to ERANGE. If BASE is - * incorrect then zero is returned. - * - * Programmer: Robb Matzke - * Thursday, April 9, 1998 - * - *------------------------------------------------------------------------- - */ -#ifndef HDstrtoll -int64_t -HDstrtoll(const char *s, const char **rest, int base) -{ - int64_t sign = 1, acc = 0; - hbool_t overflow = FALSE; - - errno = 0; - if (!s || (base && (base < 2 || base > 36))) { - if (rest) - *rest = s; - return 0; - } - - /* Skip white space */ - while (HDisspace(*s)) - s++; - - /* Optional minus or plus sign */ - if ('+' == *s) { - s++; - } - else if ('-' == *s) { - sign = -1; - s++; - } - - /* Zero base prefix */ - if (0 == base && '0' == *s && ('x' == s[1] || 'X' == s[1])) { - base = 16; - s += 2; - } - else if (0 == base && '0' == *s) { - base = 8; - s++; - } - else if (0 == base) { - base = 10; - } - - /* Digits */ - while ((base <= 10 && *s >= '0' && *s < '0' + base) || - (base > 10 && ((*s >= '0' && *s <= '9') || (*s >= 'a' && *s < 'a' + base - 10) || - (*s >= 'A' && *s < 'A' + base - 10)))) { - if (!overflow) { - int64_t digit = 0; - - if (*s >= '0' && *s <= '9') - digit = *s - '0'; - else if (*s >= 'a' && *s <= 'z') - digit = (*s - 'a') + 10; - else - digit = (*s - 'A') + 10; - - if (acc * base + digit < acc) { - overflow = TRUE; - } - else { - acc = acc * base + digit; - } - } - s++; - } - - /* Overflow */ - if (overflow) { - if (sign > 0) { - acc = ((uint64_t)1 << (8 * sizeof(int64_t) - 1)) - 1; - } - else { - acc = (int64_t)((uint64_t)1 << (8 * sizeof(int64_t) - 1)); - } - errno = ERANGE; - } - - /* Return values */ - acc *= sign; - if (rest) - *rest = s; - return acc; -} /* end HDstrtoll() */ -#endif - /*------------------------------------------------------------------------- * Function: HDrand/HDsrand * @@ -964,10 +839,7 @@ H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) * Note that commodity hardware is probably going to have a * resolution of milliseconds, not nanoseconds. * - * Return: SUCCEED/FAIL - * - * Programmer: Quincey Koziol - * October 01, 2016 + * Return: void *-------------------------------------------------------------------------- */ void @@ -976,21 +848,40 @@ H5_nanosleep(uint64_t nanosec) FUNC_ENTER_NOAPI_NOINIT_NOERR #ifdef H5_HAVE_WIN32_API + DWORD dwMilliseconds = (DWORD)HDceil(nanosec / 1.0e6); + DWORD ignore; - /* On Windows, Sleep() is in milliseconds. Passing 0 to Sleep() - * causes the thread to relinquish the rest of its time slice. + /* Windows can't sleep at a ns resolution. Best we can do is ~1 ms. We + * don't care about the return value since the second parameter + * (bAlertable) is FALSE, so it will always be zero. */ - Sleep(nanosec / (1000 * 1000)); + ignore = SleepEx(dwMilliseconds, FALSE); #else - { - struct timespec sleeptime; /* Struct to hold time to sleep */ - /* Set up time to sleep */ - sleeptime.tv_sec = 0; - sleeptime.tv_nsec = (long)nanosec; + const uint64_t nanosec_per_sec = 1000 * 1000 * 1000; + struct timespec sleeptime; /* Struct to hold time to sleep */ - HDnanosleep(&sleeptime, NULL); + /* Set up time to sleep + * + * Assuming ILP32 or LP64 or wider architecture, (long)operand + * satisfies 0 <= operand < nanosec_per_sec < LONG_MAX. + * + * It's harder to be sure that we don't overflow time_t. + */ + sleeptime.tv_sec = (time_t)(nanosec / nanosec_per_sec); + sleeptime.tv_nsec = (long)(nanosec % nanosec_per_sec); + + /* Sleep for up to `sleeptime` and, in the event of an interruption, + * save the unslept time back to `sleeptime`. + */ + while (HDnanosleep(&sleeptime, &sleeptime) == -1) { + /* If we were just interrupted, sleep for the remaining time. + * Otherwise, the error was essentially impossible, so just stop + * sleeping. + */ + if (errno != EINTR) + break; } #endif diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 88911b07b5a..061764357b6 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -45,7 +45,6 @@ typedef __int64 h5_stat_size_t; #define HDlseek(F, O, W) _lseeki64(F, O, W) #define HDlstat(S, B) _lstati64(S, B) #define HDmkdir(S, M) _mkdir(S) -#define HDnanosleep(N, O) Wnanosleep(N, O) #define HDoff_t __int64 /* Note that the variadic HDopen macro is using a VC++ extension diff --git a/test/tarray.c b/test/tarray.c index 10480fe697b..61db84c96a5 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -157,8 +157,9 @@ test_array_atomic_1d(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -490,8 +491,9 @@ test_array_array_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims1; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -668,8 +670,9 @@ test_array_compound_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -889,8 +892,9 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -951,9 +955,9 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf( - "Nested array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1210,8 +1214,9 @@ test_array_vlen_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1440,8 +1445,9 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1472,8 +1478,9 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2081,9 +2088,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2129,9 +2136,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf( - "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, - rdims1[i], i, tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE + ", tdims1[%d]=%" PRIuHSIZE "\n", + i, rdims1[i], i, tdims1[i]); continue; } /* end if */ diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index d0db06aeabf..2aa9e25e1d0 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -95,7 +95,6 @@ print_stats(const char *prefix, static void synchronize(void) { -#ifdef H5_HAVE_SYSTEM #if defined(H5_HAVE_WIN32_API) && !defined(__CYGWIN__) _flushall(); #else @@ -107,7 +106,6 @@ synchronize(void) status = HDsystem("df >/dev/null"); HDassert(status >= 0); #endif -#endif } /*------------------------------------------------------------------------- diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index f67a7a67678..1af23187876 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -1264,13 +1264,6 @@ do_fclose(iotype iot, file_descr *fd /*out*/) * Programmer: Albert Cheng 2001/12/12 * Modifications: Support for file drivers. Christian Chilan, April, 2008 */ -/* Disable warning for "format not a string literal" here -QAK */ -/* - * This pragma only needs to surround the snprintf() calls with - * 'temp' in the code below, but early (4.4.7, at least) gcc only - * allows diagnostic pragmas to be toggled outside of functions. - */ -H5_GCC_DIAG_OFF("format-nonliteral") static void do_cleanupfile(iotype iot, char *filename) { @@ -1333,4 +1326,3 @@ do_cleanupfile(iotype iot, char *filename) } } } -H5_GCC_DIAG_ON("format-nonliteral")