]> Creatis software - gdcm.git/blobdiff - src/gdcmDocument.cxx
COMP: Fix warning
[gdcm.git] / src / gdcmDocument.cxx
index 377d95a988fa9afaf46e4c638fbd4481b89ff126..0707e2b97c8617304c39580f184ff9996a37d3c1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/03 14:21:50 $
-  Version:   $Revision: 1.321 $
+  Date:      $Date: 2005/11/03 14:55:24 $
+  Version:   $Revision: 1.323 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -76,7 +76,6 @@ Document::~Document ()
 
 //-----------------------------------------------------------------------------
 // Public
-
 /**
  * \brief   Loader. use SetLoadMode(), SetFileName() before ! 
  * @return false if file cannot be open or no swap info was found,
@@ -1543,7 +1542,9 @@ VRKey Document::FindDocEntryVR()
 
    if ( !CheckDocEntryVR(vr) )
    {
-      gdcmWarningMacro( "Unknown VR " << std::hex << "0x(" 
+      // Don't warn user with useless messages
+      if ( (unsigned char)vr[0] != 0xff || (unsigned char)vr[1] != 0xff )
+         gdcmWarningMacro( "Unknown VR " << std::hex << "0x(" 
                         << (unsigned int)vr[0] << "|" << (unsigned int)vr[1] 
                         << ") at offset :" << positionOnEntry );
       Fp->seekg(positionOnEntry, std::ios::beg);