Fix some comparisons of signed with unsigned.
authorCarl Hetherington <cth@carlh.net>
Mon, 11 Jan 2016 11:23:33 +0000 (11:23 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 14 Jan 2016 23:01:39 +0000 (23:01 +0000)
src/AS_02_PCM.cpp
src/AS_DCP_internal.h
src/MXFTypes.cpp
src/asdcp-test.cpp
src/pinkwave.cpp

index 598e926057144b363129ec8e1b4cbc9fd901fd91..2336db2120193ab09a06d752170eb4956debc20a 100644 (file)
@@ -165,7 +165,7 @@ AS_02::PCM::MXFReader::h__Reader::ReadFrame(ui32_t FrameNum, ASDCP::PCM::FrameBu
 
   assert(m_ClipEssenceBegin);
   ui64_t offset = FrameNum * m_BytesPerFrame;
-  ui64_t position = m_ClipEssenceBegin + offset;
+  Kumu::fpos_t position = m_ClipEssenceBegin + offset;
   Result_t result = RESULT_OK;
 
   if ( m_File.Tell() != position )
index 6ca8f9c8c35f004e83f96a396e7629bef028e818..a74b3e25cdf0d8c1e04fb6be17e0c38c8e5e192d 100755 (executable)
@@ -331,7 +331,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 ( (Kumu::fpos_t) TmpEntry.StreamOffset != m_LastPosition )
            {
              m_LastPosition = TmpEntry.StreamOffset;
              result = m_File.Seek(TmpEntry.StreamOffset);
@@ -370,7 +370,7 @@ namespace ASDCP
          streamOffset = body_offset + TmpEntry.StreamOffset;
          temporalOffset = TmpEntry.TemporalOffset;
          keyFrameOffset = TmpEntry.KeyFrameOffset;
-         
+
          return RESULT_OK;
        }
 
@@ -380,7 +380,7 @@ namespace ASDCP
          m_File.Close();
        }
       };
-      
+
       //------------------------------------------------------------------------------------------
       //
 
@@ -621,7 +621,7 @@ namespace ASDCP
          MPTrack.Clip->Duration.set_has_value();
          m_DurationUpdateList.push_back(&(MPTrack.Clip->Duration.get()));
 
-  
+
          //
          // File (Source) Package
          //
@@ -727,7 +727,7 @@ namespace ASDCP
 
          m_DurationUpdateList.push_back(&(MPTrack.Clip->Duration));
 
-  
+
          //
          // File (Source) Package
          //
@@ -814,7 +814,7 @@ namespace ASDCP
        }
 
       };
-      
+
   }/// namespace MXF
 
   //------------------------------------------------------------------------------------------
index 39a25210209bb3657572c3798c2341f4d2e2e77d..c7e8dfb42ab287322888196950cb45266fc7e467 100755 (executable)
@@ -709,7 +709,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]);
 
index a7ee190121fb5b347ae8e565f897d6ccaebc4016..87dd9df638e78e548faeead6372961dd3dd86205 100755 (executable)
@@ -1944,7 +1944,7 @@ main(int argc, const char** argv)
     {
       result = show_file_info(Options);
 
-      for ( int i = 1; ASDCP_SUCCESS(result) && i < Options.file_count; ++i )
+      for ( ui32_t i = 1; ASDCP_SUCCESS(result) && i < Options.file_count; ++i )
        {
          Options.filenames[0] = Options.filenames[i]; // oh-so hackish
          result = show_file_info(Options);
index 646322e5a1cb3cefd0a4bc69317aa5d32079732d..63bc1000a05632be552d1e2f5582b190537a18a7 100644 (file)
@@ -209,7 +209,7 @@ make_pink_wav_file(CommandOptions& Options)
          // fill the frame buffer with a frame of pink noise
          byte_t *p = FrameBuffer.Data();
 
-         for ( int i = 0; i < samples_per_frame; ++i )
+         for ( ui32_t i = 0; i < samples_per_frame; ++i )
            {
              float pink_sample = pink_filter.GetNextSample(lcg.GetNextSample());
              ScalePackSample(pink_sample, p, ADesc.BlockAlign);