From: jpr Date: Tue, 14 Jun 2005 09:21:00 +0000 (+0000) Subject: To avoid 'unused' warning X-Git-Tag: Version1.2.bp~509 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2f99095f26ce8ce262648442210f97b5fd59fe59;p=gdcm.git To avoid 'unused' warning --- diff --git a/Example/ReWrite.cxx b/Example/ReWrite.cxx index 7dfb4a0e..c09585a7 100644 --- a/Example/ReWrite.cxx +++ b/Example/ReWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: ReWrite.cxx,v $ Language: C++ - Date: $Date: 2005/06/14 09:04:59 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/06/14 09:21:00 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) } gdcm::FileHelper *f1 = new gdcm::FileHelper(e1); - void *imageData; + void *imageData; int dataSize; if (rgb) @@ -123,10 +123,14 @@ int main(int argc, char *argv[]) else { dataSize = f1->GetImageDataRawSize(); - imageData = f1->GetImageDataRaw(); + imageData = f1->GetImageDataRaw();// somewhat important... can't remember f1->SetWriteModeToRaw(); } + if ( imageData == 0 ) // to avoid warning + { + std::cout << "Was unable to read pixels " << std::endl; + } std::cout <