From eb941e8785d3742b8a6a1aac964d43dcb4cf49f0 Mon Sep 17 00:00:00 2001 From: malaterre Date: Fri, 5 Sep 2003 11:53:38 +0000 Subject: [PATCH] * src/*.cxx : added pragma disable 4786/4251 to get rid of ~4300 warning when building in debug mode * vtk/win32/vtkgdcm.dsp : change /MT -> /MD and /MTd -> /MDd to match src/win32/gdcmdll.dsp * vtk/win32/vtkgdcm.dsp : added /nodefaultlib "mscvrt" for debug mode --- ChangeLog | 6 ++++++ src/gdcmDict.cxx | 10 ++++++++++ src/gdcmDictEntry.cxx | 10 ++++++++++ src/gdcmDictSet.cxx | 11 +++++++++++ src/gdcmElValSet.cxx | 9 +++++++++ src/gdcmException.cxx | 11 +++++++++++ src/gdcmFile.cxx | 12 ++++++++++++ src/gdcmHeader.cxx | 13 ++++++++++++- src/gdcmHeaderIdo.cxx | 10 ++++++++++ src/gdcmJpeg.cxx | 10 ++++++++++ src/gdcmJpeg12.cxx | 10 ++++++++++ src/gdcmJpeg2000.cxx | 9 +++++++++ src/gdcmRLE.cxx | 10 ++++++++++ src/gdcmTS.cxx | 10 ++++++++++ src/gdcmUtil.cxx | 12 +++++++++++- src/gdcmVR.cxx | 10 ++++++++++ vtk/win32/vtkgdcm.dsp | 8 ++++---- 17 files changed, 165 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68411b21..7a8b734d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-09-05 Mathieu Malaterre + * src/*.cxx : added pragma disable 4786/4251 to get rid of ~4300 warning + when building in debug mode + * vtk/win32/vtkgdcm.dsp : change /MT -> /MD and /MTd -> /MDd to match + src/win32/gdcmdll.dsp + * vtk/win32/vtkgdcm.dsp : added /nodefaultlib "mscvrt" for debug mode 2003-08-29 Mathieu Malaterre * Corrected a leak in vtkGdcmREader.cxx, the pSource was find thanks to valgrind. 2003-07-29 Mathieu Malaterre diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index 2b8dff9e..6808a8d0 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -1,5 +1,15 @@ // gdcmDict.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmDict.h" #include "gdcmUtil.h" diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index 152e6d09..85449a08 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -1,5 +1,15 @@ // gdcmDictEntry.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include // FIXME For sprintf #include "gdcmDictEntry.h" #include "gdcmUtil.h" diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index d75a14e2..c13cf1df 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -1,5 +1,16 @@ // gdcmDictEntry +#ifdef _MSC_VER +//'identifier' : decorated name length exceeded, name was truncated +//#pragma warning ( disable : 4503 ) +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include // For getenv #include "gdcmUtil.h" diff --git a/src/gdcmElValSet.cxx b/src/gdcmElValSet.cxx index 58302b3d..38310a46 100644 --- a/src/gdcmElValSet.cxx +++ b/src/gdcmElValSet.cxx @@ -1,5 +1,14 @@ // gdcmElValSet.cxx +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmUtil.h" #include "gdcmElValSet.h" diff --git a/src/gdcmException.cxx b/src/gdcmException.cxx index c1ee3086..53d40a73 100644 --- a/src/gdcmException.cxx +++ b/src/gdcmException.cxx @@ -1,3 +1,14 @@ +#ifdef _MSC_VER +//'identifier' : not all control paths return a value +//#pragma warning ( disable : 4715 ) +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include "gdcmException.h" #include diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 29cd7a76..ddde9fe4 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -1,5 +1,17 @@ // gdcmFile.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'type' : forcing value to bool 'true' or 'false' (performance warning) +//#pragma warning ( disable : 4800 ) +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include "gdcmFile.h" #include "gdcmUtil.h" #include "iddcmjpeg.h" // for the 'LibIDO' Jpeg LossLess diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index d09ff768..7262da32 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -1,5 +1,16 @@ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.81 2003/09/05 11:53:39 malaterre Exp $ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.80 2003/07/28 12:21:09 malaterre Exp $ +//This is needed when compiling in debug mode +#ifdef _MSC_VER +//'identifier' : not all control paths return a value +//#pragma warning ( disable : 4715 ) +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER #include #include diff --git a/src/gdcmHeaderIdo.cxx b/src/gdcmHeaderIdo.cxx index a6f1a4cd..cc905fdc 100644 --- a/src/gdcmHeaderIdo.cxx +++ b/src/gdcmHeaderIdo.cxx @@ -1,5 +1,15 @@ // gdcmHeaderIdo.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include "gdcmIdo.h" #include "gdcmUtil.h" using namespace std; diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index 4796cb46..01416f35 100644 --- a/src/gdcmJpeg.cxx +++ b/src/gdcmJpeg.cxx @@ -1,3 +1,13 @@ +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmFile.h" diff --git a/src/gdcmJpeg12.cxx b/src/gdcmJpeg12.cxx index 3cc6c125..4b1cff5d 100644 --- a/src/gdcmJpeg12.cxx +++ b/src/gdcmJpeg12.cxx @@ -1,3 +1,13 @@ +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmFile.h" diff --git a/src/gdcmJpeg2000.cxx b/src/gdcmJpeg2000.cxx index fb942ba2..29393004 100644 --- a/src/gdcmJpeg2000.cxx +++ b/src/gdcmJpeg2000.cxx @@ -1,3 +1,12 @@ +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER /* -------------------------------------------------------------------- */ diff --git a/src/gdcmRLE.cxx b/src/gdcmRLE.cxx index cc9fcaa1..e927c298 100644 --- a/src/gdcmRLE.cxx +++ b/src/gdcmRLE.cxx @@ -1,3 +1,13 @@ +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmFile.h" #include "jpeg/libijg8/cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx index bb18e343..e697e566 100644 --- a/src/gdcmTS.cxx +++ b/src/gdcmTS.cxx @@ -1,5 +1,15 @@ // gdcmTS.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include #include "gdcmTS.h" diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 5cb02ac3..817c93a9 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -1,4 +1,14 @@ -// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.15 2003/07/01 15:48:27 jpr Exp $ +// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.16 2003/09/05 11:53:39 malaterre Exp $ + +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER #include #include // For isspace diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index c20aa4a2..64d708e3 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -1,5 +1,15 @@ // gdcmVR.cxx +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +#endif //_MSC_VER + #include "gdcmVR.h" gdcmVR::gdcmVR(void) { diff --git a/vtk/win32/vtkgdcm.dsp b/vtk/win32/vtkgdcm.dsp index 90a71896..292d4b65 100644 --- a/vtk/win32/vtkgdcm.dsp +++ b/vtk/win32/vtkgdcm.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "$(VTKPATH)\include\vtk" /I "..\..\src" /I "..\..\src\jpeg\libijg8" /I "..\..\src\jpeg\libijg12" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(VTKPATH)\include\vtk" /I "..\..\src" /I "..\..\src\jpeg\libijg8" /I "..\..\src\jpeg\libijg12" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "NDEBUG" @@ -53,7 +53,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 Wsock32.lib /nologo /dll /machine:I386 /out:"..\..\lib\vtkgdcm.dll" /libpath:"$(VTKPATH)\lib\vtk ../../lib/" +# ADD LINK32 Wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /dll /machine:I386 /out:"..\..\lib\vtkgdcm.dll" /libpath:"$(VTKPATH)\lib\vtk ../../lib/" # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=copy ..\..\lib\vtkgdcm.dll ..\ copy Release\vtkgdcm.lib ..\..\lib\vtkgdcm.lib @@ -73,7 +73,7 @@ PostBuild_Cmds=copy ..\..\lib\vtkgdcm.dll ..\ copy Release\vtkgdcm.lib ..\..\lib # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "$(VTKPATH)\include\vtk" /I "..\..\src" /I "..\..\src\jpeg\libijg8" /I "..\..\src\jpeg\libijg12" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(VTKPATH)\include\vtk" /I "..\..\src" /I "..\..\src\jpeg\libijg8" /I "..\..\src\jpeg\libijg12" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VTKGDCM_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" @@ -83,7 +83,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Wsock32.lib /nologo /dll /debug /machine:I386 /out:"..\..\lib\vtkgdcm.dll" /pdbtype:sept /libpath:"$(VTKPATH)\lib\vtk ../../lib/" +# ADD LINK32 Wsock32.lib kernel32.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"..\..\lib\vtkgdcm.dll" /pdbtype:sept /libpath:"$(VTKPATH)\lib\vtk ../../lib/" # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Cmds=copy ..\..\lib\vtkgdcm.dll ..\ copy Debug\vtkgdcm.lib ..\..\lib\vtkgdcm.lib -- 2.48.1