Fix comparisons between signed and unsigned values.
authorCarl Hetherington <cth@carlh.net>
Mon, 6 Apr 2020 18:34:06 +0000 (20:34 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Apr 2020 19:21:18 +0000 (21:21 +0200)
src/AS_02_PCM.cpp
src/AS_DCP_internal.h
src/JP2K_Sequence_Parser.cpp
src/KM_log.cpp
src/MXFTypes.cpp

index 79dc62c5dedfd2143089453ab6635a7cd10b57f8..de6412254b91a1c6e8647abcc29d837ba3c2e4a0 100644 (file)
@@ -168,7 +168,7 @@ AS_02::PCM::MXFReader::h__Reader::ReadFrame(ui32_t FrameNum, ASDCP::PCM::FrameBu
   ui64_t position = m_ClipEssenceBegin + offset;
   Result_t result = RESULT_OK;
 
-  if ( m_File.Tell() != position )
+  if ( m_File.Tell() != static_cast<Kumu::fpos_t>(position) )
     {
       result = m_File.Seek(position);
     }
index cdcb3921645b145eec713ea0c08b2d0134cb07b5..39b2500314d5ee7227a97addcb20f15924608362 100755 (executable)
@@ -357,7 +357,7 @@ namespace ASDCP
          // get absolute frame position and go read the frame's key and length
          Result_t result = RESULT_OK;
 
-         if ( TmpEntry.StreamOffset != m_LastPosition )
+         if ( static_cast<Kumu::fpos_t>(TmpEntry.StreamOffset) != m_LastPosition )
            {
              m_LastPosition = TmpEntry.StreamOffset;
              result = m_File.Seek(TmpEntry.StreamOffset);
index c5610337fd3fedbd863b792b5632a1810cec9d63..a8de92510bc14fb2985c2f6ef2cf6103b53ef019 100755 (executable)
@@ -259,7 +259,7 @@ operator==(const ASDCP::JP2K::ExtendedCapabilities_t& lhs, const ASDCP::JP2K::Ex
 
                if (lhs.Pcap != rhs.Pcap) return false;
 
-               for (ui32_t i = 0; i < lhs.N; i++)
+               for (i32_t i = 0; i < lhs.N; i++)
                {
                        if (lhs.Ccap[i] != rhs.Ccap[i])
                                return false;
index d820dba50df002aaf82e652c664d765e829dd386..1a9354a8395a6ee3aba966cf94c4a1c4629f9820 100755 (executable)
@@ -152,7 +152,7 @@ Kumu::StreamLogSink::WriteEntry(const LogEntry& Entry)
     {
       Entry.CreateStringWithOptions(buf, m_options);
       ssize_t n = write(m_fd, buf.c_str(), buf.size());
-      assert(n==buf.size());
+      assert(n==static_cast<ssize_t>(buf.size()));
     }
 }
 
index 72338bbfda5f3290f8de2b9990345e4c52e92ba9..77030e9249ff4a5f6afe3c4e9085fcd4b3f62fea 100755 (executable)
@@ -715,7 +715,7 @@ ASDCP::MXF::RGBALayout::EncodeString(char* buf, ui32_t buf_len) const
   std::string tmp_str;
   char tmp_buf[64];
 
-  for ( int i = 0; i < RGBAValueLength && m_value[i] != 0; i += 2 )
+  for ( size_t i = 0; i < RGBAValueLength && m_value[i] != 0; i += 2 )
     {
       snprintf(tmp_buf, 64, "%c(%d)", get_char_for_code(m_value[i]), m_value[i+1]);
 
@@ -815,7 +815,7 @@ ASDCP::MXF::J2KExtendedCapabilitiesType::EncodeString(char* str_buf, ui32_t buf_
 
   if ( Pcap != 0 && buf_len > str_len )
     {
-      for ( int i = 0; i < Ccap.size(); ++i )
+      for ( size_t i = 0; i < Ccap.size(); ++i )
         {
          snprintf(str_buf+(i*3), 4, "%02hx.", Ccap[i].value);
         }