]> Creatis software - gdcm.git/commitdiff
COMP: Fix compilation warnings on SGI and Visual Studio
authormalaterre <malaterre>
Sun, 23 Jan 2005 18:13:48 +0000 (18:13 +0000)
committermalaterre <malaterre>
Sun, 23 Jan 2005 18:13:48 +0000 (18:13 +0000)
src/gdcmJpeg.cxx

index 2eebc88b061060b39ec2257df3f63c6a4fa88372..da708963f8d8a788264550523e43eeb59ee9bf90 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmJpeg.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/20 17:17:13 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2005/01/23 18:13:48 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,6 +83,23 @@ of the uncompressed pixel data from which the compressed data is derived
  * (stdio.h is sufficient on ANSI-conforming systems.)
  * You may also wish to include "jerror.h".
  */
+#if defined(__sgi) && !defined(__GNUC__)
+// Try to get rid of the warning:
+//cc-3505 CC: WARNING File = /usr/include/internal/setjmp_core.h, Line = 74
+//  setjmp not marked as unknown_control_flow because it is not declared as a
+//          function
+//
+//  #pragma unknown_control_flow (setjmp)
+#  if   (_COMPILER_VERSION >= 730)
+#  pragma set woff 3505
+#  endif
+#endif
+#ifdef _MSC_VER
+// Let us get rid of this funny warning on /W4:
+// warning C4611: interaction between '_setjmp' and C++ object
+// destruction is non-portable
+#pragma warning( disable : 4611 )
+#endif
 
 #include <setjmp.h>
 #include <fstream>
@@ -614,6 +631,10 @@ bool gdcm_read_JPEG_file ( std::ifstream* fp, void* image_buffer )
  * On some systems you may need to set up a signal handler to ensure that
  * temporary files are deleted if the program is interrupted.  See libjpeg.doc.
  */
+#ifdef _MSC_VER
+// Put the warning back
+#pragma warning( default : 4611 )
+#endif
  
 //----------------------------------------------------------------------------