summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorTom Rondeau2010-11-08 00:47:10 -0500
committerTom Rondeau2010-11-08 22:42:10 -0500
commitd46b800b882724c07975f1dc897f8166d45150fb (patch)
treef193a5d8ea99421a8ca8c4ce89714f7ca893295f /gnuradio-core
parent1fa9a8ea31115b878bff48d2259fc72d1a37b52c (diff)
downloadgnuradio-d46b800b882724c07975f1dc897f8166d45150fb.tar.gz
gnuradio-d46b800b882724c07975f1dc897f8166d45150fb.tar.bz2
gnuradio-d46b800b882724c07975f1dc897f8166d45150fb.zip
Fixing signed/unsigned warnings.
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc11
-rw-r--r--gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc2
-rw-r--r--gnuradio-core/src/lib/general/gr_float_to_complex.cc4
-rw-r--r--gnuradio-core/src/lib/gengen/gr_add_XX.cc.t2
-rw-r--r--gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t4
-rw-r--r--gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t2
-rw-r--r--gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t4
7 files changed, 14 insertions, 15 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
index 399632003..59b76a6f0 100644
--- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
+++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
@@ -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
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc
index 8a0ad1c4c..e20bc38bb 100644
--- a/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc
+++ b/gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc
@@ -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++;
}
diff --git a/gnuradio-core/src/lib/general/gr_float_to_complex.cc b/gnuradio-core/src/lib/general/gr_float_to_complex.cc
index 89ef18869..a392abd06 100644
--- a/gnuradio-core/src/lib/general/gr_float_to_complex.cc
+++ b/gnuradio-core/src/lib/general/gr_float_to_complex.cc
@@ -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;
diff --git a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
index 58a25325a..0e8b23ee1 100644
--- a/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
+++ b/gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
@@ -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];
diff --git a/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
index 1200145fa..ea245b57b 100644
--- a/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
+++ b/gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
@@ -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];
diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
index 13ec0c8b3..5d270c763 100644
--- a/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
+++ b/gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
@@ -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];
diff --git a/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t b/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t
index f0ed75217..1dcdf81ad 100644
--- a/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t
+++ b/gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t
@@ -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];