From 4a9e61e1cd76701a8a8eeb451cb309e3a4c62970 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 21 Oct 2021 04:04:53 -0400 Subject: [PATCH] COMP: Fix -Wsign-compare and -Wunused-variable in ctkDICOMItem class --- Libs/DICOM/Core/ctkDICOMItem.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libs/DICOM/Core/ctkDICOMItem.cpp b/Libs/DICOM/Core/ctkDICOMItem.cpp index ea8b11a68f..6df535f420 100644 --- a/Libs/DICOM/Core/ctkDICOMItem.cpp +++ b/Libs/DICOM/Core/ctkDICOMItem.cpp @@ -427,9 +427,8 @@ QString ctkDICOMItem::Decode( const DcmTag& tag, const OFString& raw ) const std::cerr << "DICOM dataset contains some encoding that we never thought we would see (" << d->m_SpecificCharacterSet.toStdString() << "). Using ASCII encoding." << std::endl; // Replace non-ASCII characters by "?" to avoid decoding errors and random special characters appearing in strings. QString asciiString; - for (int i = 0; i < raw.length(); i++) + for (size_t i = 0; i < raw.length(); i++) { - int ch = raw[i]; if (32 <= raw[i] && raw[i] < 128) { asciiString += raw[i];