Tweaks for gcc 4.3 based on patch from Marek Mahut <mmahut@fedoraproject.org>.
[debian/gnuradio] / gnuradio-core / src / lib / general / gr_delay.cc
index 12c50e4b6c791c859aee76ba567170fd9d1091ee..d52faca39a58f45bd2419e045107f004cb513429 100644 (file)
@@ -6,7 +6,7 @@
  * 
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  * 
  * GNU Radio is distributed in the hope that it will be useful,
@@ -26,6 +26,7 @@
 
 #include <gr_delay.h>
 #include <gr_io_signature.h>
+#include <string.h>
 
 gr_delay_sptr
 gr_make_delay (size_t itemsize, int delay)
@@ -52,11 +53,11 @@ gr_delay::work (int noutput_items,
   const char *iptr;
   char *optr;
 
-  for(int i = 0; i < input_items.size(); i++) {
+  for(size_t i = 0; i < input_items.size(); i++) {
     iptr = (const char *) input_items[i];
     optr = (char *) output_items[i];
 
-    memcpy(optr, iptr + delay()*d_itemsize, noutput_items*d_itemsize);
+    memcpy(optr, iptr, noutput_items*d_itemsize);
   }
   
   return noutput_items;