[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/02: blocks: resolve char sign ambiguity
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/02: blocks: resolve char sign ambiguity causing build breakage with several gcc versions |
Date: |
Mon, 28 Dec 2015 16:42:49 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 155f225225a0a7210a66d90d189b397487b1e466
Author: Tim O'Shea <address@hidden>
Date: Fri Dec 18 10:02:57 2015 -0800
blocks: resolve char sign ambiguity causing build breakage with several gcc
versions
---
gr-blocks/include/gnuradio/blocks/add_const_bb.h | 6 +++---
gr-blocks/lib/add_const_bb_impl.cc | 16 ++++++++--------
gr-blocks/lib/add_const_bb_impl.h | 8 ++++----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/gr-blocks/include/gnuradio/blocks/add_const_bb.h
b/gr-blocks/include/gnuradio/blocks/add_const_bb.h
index 4e456f9..6d4875d 100644
--- a/gr-blocks/include/gnuradio/blocks/add_const_bb.h
+++ b/gr-blocks/include/gnuradio/blocks/add_const_bb.h
@@ -44,17 +44,17 @@ namespace gr {
* \brief Create an instance of add_const_bb
* \param k additive constant
*/
- static sptr make(char k);
+ static sptr make(unsigned char k);
/*!
* \brief Return additive constant
*/
- virtual char k() const = 0;
+ virtual unsigned char k() const = 0;
/*!
* \brief Set additive constant
*/
- virtual void set_k(char k) = 0;
+ virtual void set_k(unsigned char k) = 0;
};
}
diff --git a/gr-blocks/lib/add_const_bb_impl.cc
b/gr-blocks/lib/add_const_bb_impl.cc
index e1c8082..651b919 100644
--- a/gr-blocks/lib/add_const_bb_impl.cc
+++ b/gr-blocks/lib/add_const_bb_impl.cc
@@ -30,16 +30,16 @@
namespace gr {
namespace blocks {
- add_const_bb::sptr add_const_bb::make(char k)
+ add_const_bb::sptr add_const_bb::make(unsigned char k)
{
return gnuradio::get_initial_sptr
(new add_const_bb_impl(k));
}
- add_const_bb_impl::add_const_bb_impl(char k)
+ add_const_bb_impl::add_const_bb_impl(unsigned char k)
: sync_block("add_const_bb",
- io_signature::make (1, 1, sizeof(char)),
- io_signature::make (1, 1, sizeof(char))),
+ io_signature::make (1, 1, sizeof(unsigned char)),
+ io_signature::make (1, 1, sizeof(unsigned char))),
d_k(k)
{
}
@@ -53,8 +53,8 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- const char *iptr = (const char *) input_items[0];
- char *optr = (char *) output_items[0];
+ const unsigned char *iptr = (const unsigned char *) input_items[0];
+ unsigned char *optr = (unsigned char *) output_items[0];
int size = noutput_items;
@@ -82,7 +82,7 @@ namespace gr {
{
#ifdef GR_CTRLPORT
add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_get<add_const_bb, char>(
+ rpcbasic_sptr(new rpcbasic_register_get<add_const_bb, unsigned char>(
alias(), "Constant",
&add_const_bb::k,
pmt::from_long(-128),
@@ -92,7 +92,7 @@ namespace gr {
DISPTIME | DISPOPTCPLX | DISPOPTSTRIP)));
add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_set<add_const_bb, char>(
+ rpcbasic_sptr(new rpcbasic_register_set<add_const_bb, unsigned char>(
alias(), "Constant",
&add_const_bb::set_k,
pmt::from_long(-128),
diff --git a/gr-blocks/lib/add_const_bb_impl.h
b/gr-blocks/lib/add_const_bb_impl.h
index 8bded0c..677569c 100644
--- a/gr-blocks/lib/add_const_bb_impl.h
+++ b/gr-blocks/lib/add_const_bb_impl.h
@@ -31,16 +31,16 @@ namespace gr {
class BLOCKS_API add_const_bb_impl : public add_const_bb
{
private:
- char d_k;
+ unsigned char d_k;
public:
- add_const_bb_impl(char k);
+ add_const_bb_impl(unsigned char k);
~add_const_bb_impl();
void setup_rpc();
- char k() const { return d_k; }
- void set_k(char k) { d_k = k; }
+ unsigned char k() const { return d_k; }
+ void set_k(unsigned char k) { d_k = k; }
int work(int noutput_items,
gr_vector_const_void_star &input_items,