From 327ad94af0b7e8bce9c8931789133757b318132b Mon Sep 17 00:00:00 2001 From: jpr Date: Fri, 12 May 2006 09:36:09 +0000 Subject: [PATCH] Port Mathieu's modif from gdcm1.2 --- src/gdcmDirList.cxx | 13 +++++-------- src/gdcmDocument.cxx | 7 ++++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index e6c05239..c2e6a8ab 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDirList.cxx,v $ Language: C++ - Date: $Date: 2006/01/10 15:54:03 $ - Version: $Revision: 1.58 $ + Date: $Date: 2006/05/12 09:36:09 $ + Version: $Revision: 1.59 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -78,8 +78,7 @@ bool DirList::IsDirectory(std::string const &dirName) } else { - const char *str = strerror(errno); - gdcmStaticErrorMacro( str ); + gdcmStaticErrorMacro( strerror(errno) ); return false; } } @@ -163,8 +162,7 @@ int DirList::Explore(std::string const &dirpath, bool recursive) fileName = dirName + d->d_name; if( stat(fileName.c_str(), &buf) != 0 ) { - const char *str = strerror(errno); - gdcmErrorMacro( str ); + gdcmErrorMacro( strerror(errno) ); } if ( S_ISREG(buf.st_mode) ) //is it a regular file? { @@ -186,8 +184,7 @@ int DirList::Explore(std::string const &dirpath, bool recursive) } if( closedir(dir) != 0 ) { - const char *str = strerror(errno); - gdcmErrorMacro( str ); + gdcmErrorMacro( strerror(errno) ); } #endif diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 8ac4b229..9ddb8a57 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2006/05/05 22:13:55 $ - Version: $Revision: 1.347 $ + Date: $Date: 2006/05/12 09:37:45 $ + Version: $Revision: 1.348 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1064,7 +1064,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, if( Debug::GetDebugFlag() ) std::cout << std::dec <<"(long)(Fp->tellg()) " << (long)(Fp->tellg()) // in Debug mode << std::hex << " 0x(" <<(long)(Fp->tellg()) << ")" << std::endl; -*/ + */ // if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max) // Once per DocEntry if ( !delim_mode ) // 'and then' doesn't exist in C++ :-( @@ -1803,6 +1803,7 @@ bool Document::IsDocEntryAnInteger(DocEntry *entry) // encounter such an ill-formed image, we simply display a warning // message and proceed on parsing (while crossing fingers). long filePosition = Fp->tellg(); // Only when elem 0x0000 length is not 4 (?!?) + (void)filePosition; gdcmWarningMacro( "Erroneous Group Length element length on : (" << std::hex << group << " , " << elem << ") -before- position x(" << filePosition << ")" -- 2.45.1