[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. a464527c170c7f4f86bc26f38f5ae1465c
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2020-06-25 09:38:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, release has been updated
via a464527c170c7f4f86bc26f38f5ae1465c6dd741 (commit)
via 435e5452a460093f6ea5404e7f042464eb83a43d (commit)
from 858143e454aacb93dab379ed60272c075ed3b637 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/a464527c170c7f4f86bc26f38f5ae1465c6dd741/
commit a464527c170c7f4f86bc26f38f5ae1465c6dd741
Merge: 858143e45 435e5452a
Author: Mathieu Malaterre <mat...@gm...>
Date: Thu Jun 25 11:38:03 2020 +0200
Merge branch 'release-2-8' into release
https://sourceforge.net/p/gdcm/gdcm/ci/435e5452a460093f6ea5404e7f042464eb83a43d/
commit 435e5452a460093f6ea5404e7f042464eb83a43d
Author: Sérgio Basto <se...@se...>
Date: Thu Jun 25 11:36:31 2020 +0200
Provide a fix for bug #487
FTBFS: a test tries to convert EOF to unsigned char
Description of problem:
Test in Testing/Source/Common/Cxx/TestString2.cxx tries to set EOF as delimiter for gdcm::String<>. This fails on ppc64le, aarch64, s390x and armv7hl as the delimiter is char and it seems that char on these architectures is actually unsigned char, hence the "error: narrowing conversion of '-1' from 'int' to 'char'" error.
I'm not sure why it needs EOF as delimiter in a string but there seems to be these solutions to this:
1) don't run the test
2) don't use EOF as delimiter, use e.g. '\0' instead
3) change definition of the TDelimiter to int (+ a lot of other needed changes probably)
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1670036
diff --git a/Testing/Source/Common/Cxx/TestString2.cxx b/Testing/Source/Common/Cxx/TestString2.cxx
index 59e81c768..59bc07b28 100644
--- a/Testing/Source/Common/Cxx/TestString2.cxx
+++ b/Testing/Source/Common/Cxx/TestString2.cxx
@@ -16,7 +16,6 @@
#include <iostream>
#include <string.h> // strlen
-#include <stdio.h> // EOF
int TestString2(int , char *[])
{
@@ -26,24 +25,24 @@ int TestString2(int , char *[])
gdcm::String<> s2 = "coucou!";
std::cout << s2 << " -> " << s2.size() << std::endl;
- gdcm::String<EOF,64,0> s3 = "coucou";
+ gdcm::String<'\0',64,0> s3 = "coucou";
std::cout << s3.c_str() << " -> " << s3.size() << std::endl;
- gdcm::String<EOF,64,0> s4 = "coucou!";
+ gdcm::String<'\0',64,0> s4 = "coucou!";
std::cout << s4.c_str() << " -> " << s4.size() << std::endl;
const char *s = "coucou!";
- gdcm::String<EOF,64,0> s5( s, strlen(s) );
+ gdcm::String<'\0',64,0> s5( s, strlen(s) );
std::cout << s5.c_str() << " -> " << s5.size() << std::endl;
std::string ss = "coucou!";
- gdcm::String<EOF,64,0> s6( ss );
+ gdcm::String<'\0',64,0> s6( ss );
std::cout << s6.c_str() << " -> " << s6.size() << std::endl;
- gdcm::String<EOF,64,0> s7( ss, 1, 5 );
+ gdcm::String<'\0',64,0> s7( ss, 1, 5 );
std::cout << s7.c_str() << " -> " << s7.size() << std::endl;
- gdcm::String<EOF,64,0> s8( ss, 1, 6 );
+ gdcm::String<'\0',64,0> s8( ss, 1, 6 );
std::cout << s8.c_str() << " -> " << s8.size() << std::endl;
return 0;
-----------------------------------------------------------------------
Summary of changes:
Testing/Source/Common/Cxx/TestString2.cxx | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|