shithub: sox

Download patch

ref: 2648c5b89e62a0ba693307c5f3366177547dc36b
parent: a9440fd60a68ffa5a2496e26dffaa0486c0ddf2a
author: robs <robs>
date: Sun Aug 3 15:32:30 EDT 2008

quash (but not fix) 2 LFS off_t warnings

--- a/src/formats_i.c
+++ b/src/formats_i.c
@@ -219,7 +219,7 @@
   double wide_sample = to_sample - (to_sample % ft->signal.channels);
   double to_d = wide_sample * ft->encoding.bits_per_sample / 8;
   off_t to = to_d;
-  return (to != to_d)? SOX_EOF : lsx_seeki(ft, byte_offset + to, SEEK_SET);
+  return (to != to_d)? SOX_EOF : lsx_seeki(ft, (sox_ssize_t)(byte_offset + to), SEEK_SET);
 }
 
 /* Read and write known datatypes in "machine format".  Swap if indicated.
--- a/src/raw.c
+++ b/src/raw.c
@@ -17,7 +17,7 @@
 
 int lsx_rawseek(sox_format_t * ft, sox_size_t offset)
 {
-  return lsx_offset_seek(ft, ft->data_start, offset);
+  return lsx_offset_seek(ft, (off_t)ft->data_start, offset);
 }
 
 /* Works nicely for starting read and write; lsx_rawstart{read,write}