changeset 2829:61fdb06e389a

fix warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 20 Sep 2018 10:30:49 +0200
parents 859a4950d48f
children ab0fd5923c1d
files Resources/Patches/dcmtk-3.6.2-cmath.patch UnitTestsSources/DicomMapTests.cpp
diffstat 2 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/Patches/dcmtk-3.6.2-cmath.patch	Thu Sep 20 08:57:46 2018 +0200
+++ b/Resources/Patches/dcmtk-3.6.2-cmath.patch	Thu Sep 20 10:30:49 2018 +0200
@@ -1,19 +1,22 @@
 diff -urEb dcmtk-3.6.2.orig/CMake/GenerateDCMTKConfigure.cmake dcmtk-3.6.2/CMake/GenerateDCMTKConfigure.cmake
---- dcmtk-3.6.2.orig/CMake/GenerateDCMTKConfigure.cmake	2018-08-08 13:04:10.225822539 +0100
-+++ dcmtk-3.6.2/CMake/GenerateDCMTKConfigure.cmake	2018-08-08 13:47:28.668150738 +0100
-@@ -568,11 +568,11 @@
+--- dcmtk-3.6.2.orig/CMake/GenerateDCMTKConfigure.cmake	2018-09-20 09:30:34.364831213 +0200
++++ dcmtk-3.6.2/CMake/GenerateDCMTKConfigure.cmake	2018-09-20 09:47:52.013660067 +0200
+@@ -568,12 +568,12 @@
    ENDIF(HAVE_CSTDDEF)
  
    CHECK_FUNCTIONWITHHEADER_EXISTS(feenableexcept "${HEADERS}" HAVE_PROTOTYPE_FEENABLEEXCEPT)
 -  CHECK_FUNCTIONWITHHEADER_EXISTS(isinf "${HEADERS}" HAVE_PROTOTYPE_ISINF)
 -  CHECK_FUNCTIONWITHHEADER_EXISTS(isnan "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
-+  CHECK_FUNCTIONWITHHEADER_EXISTS("isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISINF)
-+  CHECK_FUNCTIONWITHHEADER_EXISTS("isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
-   CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS(finite "${HEADERS}" HAVE_PROTOTYPE_FINITE)
 -  CHECK_FUNCTIONWITHHEADER_EXISTS(std::isinf "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
 -  CHECK_FUNCTIONWITHHEADER_EXISTS(std::isnan "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS(std::finite "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
++  CHECK_FUNCTIONWITHHEADER_EXISTS("isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISINF)
++  CHECK_FUNCTIONWITHHEADER_EXISTS("isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_ISNAN)
++  CHECK_FUNCTIONWITHHEADER_EXISTS("finite(0.)" "${HEADERS}" HAVE_PROTOTYPE_FINITE)
 +  CHECK_FUNCTIONWITHHEADER_EXISTS("std::isinf(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISINF)
 +  CHECK_FUNCTIONWITHHEADER_EXISTS("std::isnan(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__ISNAN)
-   CHECK_FUNCTIONWITHHEADER_EXISTS(std::finite "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
++  CHECK_FUNCTIONWITHHEADER_EXISTS("std::finite(0.)" "${HEADERS}" HAVE_PROTOTYPE_STD__FINITE)
    CHECK_FUNCTIONWITHHEADER_EXISTS(flock "${HEADERS}" HAVE_PROTOTYPE_FLOCK)
    CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME)
+   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME_R)
--- a/UnitTestsSources/DicomMapTests.cpp	Thu Sep 20 08:57:46 2018 +0200
+++ b/UnitTestsSources/DicomMapTests.cpp	Thu Sep 20 10:30:49 2018 +0200
@@ -353,8 +353,8 @@
   ASSERT_FALSE(m.GetValue(DICOM_TAG_PATIENT_NAME).ParseUnsignedInteger32(k));
   ASSERT_FALSE(m.GetValue(DICOM_TAG_PATIENT_NAME).ParseUnsignedInteger64(l));
   ASSERT_FLOAT_EQ(-2147483648.0f, f);
-  ASSERT_DOUBLE_EQ(-2147483648.0, d); 
-  ASSERT_EQ(-2147483648, i);
+  ASSERT_DOUBLE_EQ(-2147483648.0, d);
+  ASSERT_EQ(static_cast<int32_t>(-2147483648ll), i);
   ASSERT_EQ(-2147483648ll, j);
   
   // -2**31 - 1