From 0fa193d8b312b90f2ee822e1ee87f6e2fbd1dcb5 Mon Sep 17 00:00:00 2001 From: frog Date: Wed, 28 May 2003 19:36:20 +0000 Subject: [PATCH] * When compiling with distutils (see setup.py) the C++ compiler is called with different flags than the default ones (with automake). In order to fix all those warning, I compiled gdcm with the command make 'CXXFLAGS=-Wall -Wstrict-prototypes -D__STDC_LIMIT_MACROS' and went for warning fixes: - src/gdcmHeader.cxx, Test/dcm2acr.cxx, pourFindTaggs.cxx cleaned up from unused variables. - vtk/vtkGdcmReader.cxx: potential bug fix. * src/gdcmHeader.h: Doxygen warning cleanup --- ChangeLog | 11 +++++++++++ src/gdcmDictSet.h | 4 ++-- src/gdcmElValSet.cxx | 3 ++- src/gdcmHeader.cxx | 3 +-- src/gdcmHeader.h | 8 ++++---- vtk/vtkGdcmReader.cxx | 4 ++-- 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f4c8132..1f1948d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-05-28 Eric Boix + * When compiling with distutils (see setup.py) the C++ compiler is + called with different flags than the default ones (with automake). + In order to fix all those warning, I compiled gdcm with the command + make 'CXXFLAGS=-Wall -Wstrict-prototypes -D__STDC_LIMIT_MACROS' + and went for warning fixes: + - src/gdcmHeader.cxx, Test/dcm2acr.cxx, pourFindTaggs.cxx cleaned + up from unused variables. + - vtk/vtkGdcmReader.cxx: potential bug fix. + * src/gdcmHeader.h: Doxygen warning cleanup + 2003-05-27 Eric Boix * gdcmPython/gdcm.i: - typemaps correction to take into account the systematic replacement diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index 8d9f5b04..56fcc33d 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -25,7 +25,7 @@ private: /// Directory path to dictionaries std::string DictPath; int AppendDict(gdcmDict* NewDict); - void LoadDictFromFile(std::string filename, DictKey); + void LoadDictFromFile(std::string FileName, DictKey Name); std::string BuildDictPath(void); public: std::list * GetPubDictTagNames(void); @@ -41,7 +41,7 @@ public: // TODO Swig std::string* GetAllDictNames(); gdcmDictSet(void); ~gdcmDictSet(void); - void Print(std::ostream&); + void Print(std::ostream& os); gdcmDict* GetDict(DictKey DictName); gdcmDict* GetDefaultPubDict(void); }; diff --git a/src/gdcmElValSet.cxx b/src/gdcmElValSet.cxx index fa1aa113..7e15c037 100644 --- a/src/gdcmElValSet.cxx +++ b/src/gdcmElValSet.cxx @@ -215,7 +215,8 @@ void gdcmElValSet::UpdateGroupLength(bool SkipSequence, FileType type) { for (GroupHT::iterator g = groupHt.begin(); g != groupHt.end(); ++g){ - + // FIXME: g++ -Wall -Wstrict-prototypes reports on following line: + // warning: unsigned int format, different type arg sscanf(g->first.c_str(),"%x",&gr_bid); tk = g->first + "|0000"; diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index eeba8216..29955e13 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.67 2003/05/21 16:26:28 regrain Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.68 2003/05/28 19:36:21 frog Exp $ #include #include @@ -714,7 +714,6 @@ void gdcmHeader::SetMaxSizeLoadElementValue(long NewSize) { void gdcmHeader::LoadElementValue(gdcmElValue * ElVal) { size_t item_read; guint16 group = ElVal->GetGroup(); - guint16 elem = ElVal->GetElement(); string vr = ElVal->GetVR(); guint32 length = ElVal->GetLength(); bool SkipLoad = false; diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index 5ee21488..a6a33af2 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.25 2003/05/21 16:26:28 regrain Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.26 2003/05/28 19:36:21 frog Exp $ #ifndef GDCMHEADER_H #define GDCMHEADER_H @@ -81,12 +81,12 @@ private: void SetMaxSizeLoadElementValue(long); gdcmDictEntry * GetDictEntryByNumber(guint16, guint16); - gdcmDictEntry * GetDictEntryByName(std::string name); + gdcmDictEntry * GetDictEntryByName(std::string Name); // ElValue related utilities gdcmElValue * ReadNextElement(void); gdcmElValue * NewElValueByNumber(guint16 group, guint16 element); - gdcmElValue * NewElValueByName(std::string name); + gdcmElValue * NewElValueByName(std::string Name); void FindLength(gdcmElValue *); void FindVR(gdcmElValue *); @@ -158,7 +158,7 @@ public: int SetPubElValByName(std::string content, std::string TagName); int SetPubElValByNumber(std::string content, guint16 group, guint16 element); - int SetShaElValByName(std::string content, std::string ShadowTagName); + int SetShaElValByName(std::string content, std::string TagName); int SetShaElValByNumber(std::string content, guint16 group, guint16 element); int SetPubElValLengthByNumber(guint32 lgr, guint16 group, guint16 element); diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index 5dbc83eb..a8672163 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.4 2003/05/21 16:26:29 regrain Exp $ +// $Header: /cvs/public/gdcm/vtk/vtkGdcmReader.cxx,v 1.5 2003/05/28 19:36:21 frog Exp $ //CLEANME#include #include #include @@ -166,7 +166,7 @@ void vtkGdcmReader::ExecuteData(vtkDataObject *output) int NumColumns = this->DataExtent[1] - this->DataExtent[0] + 1; int NumLines = this->DataExtent[3] - this->DataExtent[2] + 1; int NumPlanes = this->DataExtent[5] - this->DataExtent[4] + 1; - int size = NumColumns * NumLines * NumPlanes * GdcmFile.GetPixelSize(); + size_t size = NumColumns * NumLines * NumPlanes * GdcmFile.GetPixelSize(); if ( size != GdcmFile.GetImageDataSize() ) { vtkDebugMacro("Inconsistency with GetImageDataSize"); -- 2.48.1