Fixing signed/unsigned warnings.
authorTom Rondeau <trondeau@vt.edu>
Mon, 8 Nov 2010 05:47:10 +0000 (00:47 -0500)
committerTom Rondeau <trondeau@vt.edu>
Tue, 9 Nov 2010 03:42:10 +0000 (22:42 -0500)
gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc
gnuradio-core/src/lib/general/gr_float_to_complex.cc
gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t

index 39963200363512c98dff4b83ddfd63b79f68593f..59b76a6f06c193b2074a7383b68843644eebf187 100644 (file)
@@ -71,7 +71,7 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate,
 
   // Create an FIR filter for each channel and zero out the taps
   std::vector<float> vtaps(0, d_int_rate);
-  for(int i = 0; i < d_int_rate; i++) {
+  for(unsigned int i = 0; i < d_int_rate; i++) {
     d_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
     d_diff_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
   }
@@ -97,8 +97,6 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps,
                                       std::vector< std::vector<float> > &ourtaps,
                                       std::vector<gr_fir_ccf*> &ourfilter)
 {
-  int i,j;
-
   unsigned int ntaps = newtaps.size();
   d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_int_rate);
 
@@ -114,10 +112,10 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps,
   }
   
   // Partition the filter
-  for(i = 0; i < d_int_rate; i++) {
+  for(unsigned int i = 0; i < d_int_rate; i++) {
     // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out
     ourtaps[d_int_rate-1-i] = std::vector<float>(d_taps_per_filter, 0);
-    for(j = 0; j < d_taps_per_filter; j++) {
+    for(unsigned int j = 0; j < d_taps_per_filter; j++) {
       ourtaps[d_int_rate - 1 - i][j] = tmp_taps[i + j*d_int_rate];
     }
     
@@ -173,7 +171,8 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items,
     return 0;               // history requirements may have changed.
   }
 
-  int i = 0, j, count = d_start_index;
+  int i = 0, count = d_start_index;
+  unsigned int j;
   gr_complex o0, o1;
 
   // Restore the last filter position
index 8a0ad1c4c61e213fa718fb0cfb24ff43f36f7163..e20bc38bb1cb4efc198c17f4f886f8326b862a8b 100644 (file)
@@ -132,7 +132,7 @@ gr_pfb_interpolator_ccf::work (int noutput_items,
   int i = 0, count = 0;
 
   while(i < noutput_items) {
-    for(int j = 0; j < d_rate; j++) {
+    for(unsigned int j = 0; j < d_rate; j++) {
       out[i] = d_filters[j]->filter(&in[count]);
       i++;
     }
index 89ef188698f9e4d63c466df42063467f30659c67..a392abd06e85118538f007891e2d29542a201a14 100644 (file)
@@ -52,12 +52,12 @@ gr_float_to_complex::work (int noutput_items,
 
   switch (input_items.size ()){
   case 1:
-    for (int j = 0; j < noutput_items*d_vlen; j++)
+    for (size_t j = 0; j < noutput_items*d_vlen; j++)
       out[j] = gr_complex (r[j], 0);
     break;
 
   case 2:
-    for (int j = 0; j < noutput_items*d_vlen; j++)
+    for (size_t j = 0; j < noutput_items*d_vlen; j++)
       out[j] = gr_complex (r[j], i[j]);
     break;
 
index 58a25325af4dafee959e46a434c282696939e31a..0e8b23ee16c4167271a8fa8442b8d06eeb503417 100644 (file)
@@ -52,7 +52,7 @@ int
 
   int ninputs = input_items.size ();
 
-  for (int i = 0; i < noutput_items*d_vlen; i++){
+  for (size_t i = 0; i < noutput_items*d_vlen; i++){
     @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
     for (int j = 1; j < ninputs; j++)
       acc += ((@I_TYPE@ *) input_items[j])[i];
index 1200145fa39b82198e87cc1947b3a912e29b7447..ea245b57bb1bd0e15cfbc5b583d890b1055b9234 100644 (file)
@@ -53,13 +53,13 @@ int
   int ninputs = input_items.size ();
 
   if (ninputs == 1){           // compute reciprocal
-    for (int i = 0; i < noutput_items*d_vlen; i++)
+    for (size_t i = 0; i < noutput_items*d_vlen; i++)
       *optr++ = (@O_TYPE@) ((@O_TYPE@) 1 /
                            ((@I_TYPE@ *) input_items[0])[i]);
   }
 
   else {
-    for (int i = 0; i < noutput_items*d_vlen; i++){
+    for (size_t i = 0; i < noutput_items*d_vlen; i++){
       @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
       for (int j = 1; j < ninputs; j++)
        acc /= ((@I_TYPE@ *) input_items[j])[i];
index 13ec0c8b342db700304a4624fc6f9eab2ac9210b..5d270c763487b3ad58106b3ffb63654e7da600f4 100644 (file)
@@ -52,7 +52,7 @@ int
 
   int ninputs = input_items.size ();
 
-  for (int i = 0; i < noutput_items*d_vlen; i++){
+  for (size_t i = 0; i < noutput_items*d_vlen; i++){
     @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
     for (int j = 1; j < ninputs; j++)
       acc *= ((@I_TYPE@ *) input_items[j])[i];
index f0ed75217f911ebad2be34135b32b012c8bef78e..1dcdf81ad5a311417e44f37fbaec7af10b37172c 100644 (file)
@@ -53,12 +53,12 @@ int
   int ninputs = input_items.size ();
 
   if (ninputs == 1){           // negate
-    for (int i = 0; i < noutput_items*d_vlen; i++)
+    for (size_t i = 0; i < noutput_items*d_vlen; i++)
       *optr++ = (@O_TYPE@) -((@I_TYPE@ *) input_items[0])[i];
   }
 
   else {
-    for (int i = 0; i < noutput_items*d_vlen; i++){
+    for (size_t i = 0; i < noutput_items*d_vlen; i++){
       @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
       for (int j = 1; j < ninputs; j++)
        acc -= ((@I_TYPE@ *) input_items[j])[i];