[Gdcm-hackers] gdcm-git:Grassroots DICOM branch release updated. 34a12ec382cda5d05f53726f4600ef960b
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2015-10-25 09:26:08
|
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 34a12ec382cda5d05f53726f4600ef960bb19b81 (commit)
from 878a8b7d5b50e6dec6bfb2946a6988689d1440c1 (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/34a12ec382cda5d05f53726f4600ef960bb19b81/
commit 34a12ec382cda5d05f53726f4600ef960bb19b81
Author: Mathieu Malaterre <mat...@gm...>
Date: Sun Oct 25 10:25:46 2015 +0100
Remove a warning in a test
diff --git a/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVM.cxx b/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVM.cxx
index 1be049a..0942f60 100644
--- a/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVM.cxx
+++ b/Testing/Source/DataStructureAndEncodingDefinition/Cxx/TestVM.cxx
@@ -62,33 +62,36 @@ int TestVM(int, char *[])
unsigned int count10 = gdcm::VM::GetNumberOfElementsFromArray(str10, (unsigned int)strlen(str10) );
if( count10 != 1 ) return 1;
- if( gdcm::VM::VM1 & gdcm::VM::VM2 ) return 1;
- if( gdcm::VM::VM1 & gdcm::VM::VM3 ) return 1;
- if( gdcm::VM::VM1 & gdcm::VM::VM32 ) return 1;
-
- if( !(gdcm::VM::VM1 & gdcm::VM::VM1_2) ) return 1;
- if( !(gdcm::VM::VM2 & gdcm::VM::VM1_2) ) return 1;
-
- if( !(gdcm::VM::VM1 & gdcm::VM::VM1_3) ) return 1;
- if( !(gdcm::VM::VM2 & gdcm::VM::VM1_3) ) return 1;
- if( !(gdcm::VM::VM3 & gdcm::VM::VM1_3) ) return 1;
-
- if( !(gdcm::VM::VM1 & gdcm::VM::VM1_n) ) return 1;
-
- if( gdcm::VM::VM1 & gdcm::VM::VM2_n ) return 1;
- if( !(gdcm::VM::VM2 & gdcm::VM::VM2_n) ) return 1;
-
- if( gdcm::VM::VM1 & gdcm::VM::VM3_4 ) return 1;
- if( !(gdcm::VM::VM3 & gdcm::VM::VM3_4) ) return 1;
- if( !(gdcm::VM::VM4 & gdcm::VM::VM3_4) ) return 1;
-
- if( gdcm::VM::VM1 & gdcm::VM::VM3_3n ) return 1;
- if( !(gdcm::VM::VM3 & gdcm::VM::VM3_3n) ) return 1;
- if( !(gdcm::VM::VM9 & gdcm::VM::VM3_3n) ) return 1;
- if( !(gdcm::VM::VM99 & gdcm::VM::VM3_3n) ) return 1;
-
- if( gdcm::VM::VM1 & gdcm::VM::VM4_4n ) return 1;
- if( !(gdcm::VM::VM4 & gdcm::VM::VM4_4n) ) return 1;
+ // store invalid combinations inside an int array to trick the compiler
+ // and avoid unrechable return code warning
+ static const int error_combinations[] = {
+ gdcm::VM::VM1 & gdcm::VM::VM2,
+ gdcm::VM::VM1 & gdcm::VM::VM2,
+ gdcm::VM::VM1 & gdcm::VM::VM3,
+ gdcm::VM::VM1 & gdcm::VM::VM32,
+ !(gdcm::VM::VM1 & gdcm::VM::VM1_2),
+ !(gdcm::VM::VM2 & gdcm::VM::VM1_2),
+ !(gdcm::VM::VM1 & gdcm::VM::VM1_3),
+ !(gdcm::VM::VM2 & gdcm::VM::VM1_3),
+ !(gdcm::VM::VM3 & gdcm::VM::VM1_3),
+ !(gdcm::VM::VM1 & gdcm::VM::VM1_n),
+ gdcm::VM::VM1 & gdcm::VM::VM2_n,
+ !(gdcm::VM::VM2 & gdcm::VM::VM2_n),
+ gdcm::VM::VM1 & gdcm::VM::VM3_4,
+ !(gdcm::VM::VM3 & gdcm::VM::VM3_4),
+ !(gdcm::VM::VM4 & gdcm::VM::VM3_4),
+ gdcm::VM::VM1 & gdcm::VM::VM3_3n,
+ !(gdcm::VM::VM3 & gdcm::VM::VM3_3n),
+ !(gdcm::VM::VM9 & gdcm::VM::VM3_3n),
+ !(gdcm::VM::VM99 & gdcm::VM::VM3_3n),
+ gdcm::VM::VM1 & gdcm::VM::VM4_4n,
+ !(gdcm::VM::VM4 & gdcm::VM::VM4_4n),
+ };
+ static const int nerror_combinations = sizeof( error_combinations ) / sizeof( *error_combinations );
+ for( int i = 0; i < nerror_combinations; ++i )
+ {
+ if( error_combinations[i] ) return 1;
+ }
const char *vm1 = gdcm::VM::GetVMString( gdcm::VM::VM1 );
if( strcmp(vm1, "1" ) != 0 )
-----------------------------------------------------------------------
Summary of changes:
.../Cxx/TestVM.cxx | 57 ++++++++++---------
1 files changed, 30 insertions(+), 27 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|