[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/03: fec: more warning / sign cleanup
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/03: fec: more warning / sign cleanup |
Date: |
Mon, 6 Apr 2015 15:27:50 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 87f4a542c1c963603793bb0ae47f16e17d6efd9a
Author: Tim O'Shea <address@hidden>
Date: Mon Apr 6 11:20:26 2015 -0400
fec: more warning / sign cleanup
---
gr-fec/lib/async_decoder_impl.cc | 12 ++++++------
gr-fec/lib/async_decoder_impl.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc
index 2cdea6a..b5ae04b 100644
--- a/gr-fec/lib/async_decoder_impl.cc
+++ b/gr-fec/lib/async_decoder_impl.cc
@@ -113,7 +113,7 @@ namespace gr {
// bits added on to the transmitted frame.
int diff = d_decoder->rate()*d_decoder->get_input_size() -
d_decoder->get_output_size();
- int nbits_in = pmt::length(bits);
+ size_t nbits_in = pmt::length(bits);
size_t nbits_out = 0;
size_t nblocks = 1;
bool variable_frame_size = d_decoder->set_frame_size(nbits_out);
@@ -157,13 +157,13 @@ namespace gr {
}
if(d_decoder->get_shift() != 0) {
- for(int n = 0; n < nbits_in; n++)
+ for(size_t n = 0; n < nbits_in; n++)
d_tmp_f32[n] += d_decoder->get_shift();
}
if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
//volk_32f_s32f_convert_8i(d_tmp_u8, d_tmp_f32, 1, nbits_in);
- for(int n = 0; n < nbits_in; n++)
+ for(size_t n = 0; n < nbits_in; n++)
d_tmp_u8[n] = static_cast<uint8_t>(d_tmp_f32[n]);
d_decoder->generic_work((void*)d_tmp_u8, (void*)u8out);
@@ -186,7 +186,7 @@ namespace gr {
pmt::pmt_t bits(pmt::cdr(msg));
size_t o0 = 0;
- int nbits_in = pmt::length(bits);
+ size_t nbits_in = pmt::length(bits);
int nbits_out = nbits_in*d_decoder->rate();
int nbytes_out = nbits_out/8;
@@ -210,13 +210,13 @@ namespace gr {
}
if(d_decoder->get_shift() != 0) {
- for(int n = 0; n < nbits_in; n++)
+ for(size_t n = 0; n < nbits_in; n++)
d_tmp_f32[n] += d_decoder->get_shift();
}
if(strncmp(d_decoder->get_input_conversion(), "uchar", 5) == 0) {
//volk_32f_s32f_convert_8i(d_tmp_u8, d_tmp_f32, 1.0, nbits_in);
- for(int n = 0; n < nbits_in; n++)
+ for(size_t n = 0; n < nbits_in; n++)
d_tmp_u8[n] = static_cast<uint8_t>(d_tmp_f32[n]);
d_decoder->generic_work((void*)d_tmp_u8, (void*)d_bits_out);
diff --git a/gr-fec/lib/async_decoder_impl.h b/gr-fec/lib/async_decoder_impl.h
index c3c7a7c..53dc84f 100644
--- a/gr-fec/lib/async_decoder_impl.h
+++ b/gr-fec/lib/async_decoder_impl.h
@@ -44,7 +44,7 @@ namespace gr {
bool d_packed;
bool d_rev_pack;
- int d_max_bits_in;
+ size_t d_max_bits_in;
float *d_tmp_f32;
int8_t *d_tmp_u8;
uint8_t *d_bits_out;