aboutsummaryrefslogtreecommitdiffstats
path: root/lib/receiver
diff options
context:
space:
mode:
authorSteve Glass <smdg@hush.com>2015-09-27 16:14:33 +1000
committerSteve Glass <smdg@hush.com>2016-02-27 10:33:01 +1000
commitc8edec53d81bba3220c61af6649819ce243d0e5c (patch)
treec69c540dd5b3ac50de12956d899e42acb7ce484b /lib/receiver
parent3f4b949aa2aa89ee18cdcf8d33646008c2899238 (diff)
Changes to silence compiler warnings on OSX
Diffstat (limited to 'lib/receiver')
-rw-r--r--lib/receiver/clock_offset_control_impl.cc4
-rw-r--r--lib/receiver/sch.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/receiver/clock_offset_control_impl.cc b/lib/receiver/clock_offset_control_impl.cc
index a590a6d..43a9b8e 100644
--- a/lib/receiver/clock_offset_control_impl.cc
+++ b/lib/receiver/clock_offset_control_impl.cc
@@ -103,7 +103,7 @@ void clock_offset_control_impl::process_measurement(pmt::pmt_t msg)
float ppm = -freq_offset/d_fc*1.0e6;
std::string state = pmt::symbol_to_string(pmt::tuple_ref(msg,2));
d_last_state = state;
- if(abs(ppm) > 100) //safeguard against flawed measurements
+ if(std::abs(ppm) > 100.0) //safeguard against flawed measurements
{
ppm=0;
reset();
@@ -132,7 +132,7 @@ void clock_offset_control_impl::process_measurement(pmt::pmt_t msg)
if(d_counter == 5)
{
d_counter = 0;
- if(abs(d_last_ppm_estimate-d_ppm_estimate) > 0.1)
+ if(std::abs(d_last_ppm_estimate-d_ppm_estimate) > 0.1)
{
pmt::pmt_t msg_ppm = pmt::from_double(ppm);
message_port_pub(pmt::intern("ppm"), msg_ppm);
diff --git a/lib/receiver/sch.c b/lib/receiver/sch.c
index 2e7de44..3273237 100644
--- a/lib/receiver/sch.c
+++ b/lib/receiver/sch.c
@@ -261,7 +261,7 @@ int decode_sch(const unsigned char *buf, int * t1_o, int * t2_o, int * t3_o, int
memcpy(data + SCH_DATA_LEN, buf + SCH_DATA_LEN + N_SYNC_BITS, SCH_DATA_LEN);
// Viterbi decode
- if (errors = conv_decode(data, decoded_data)) {
+ if ((errors = conv_decode(data, decoded_data))) {
// fprintf(stderr, "error: sch: conv_decode (%d)\n", errors);
//DEBUGF("ERR: conv_decode %d\n", errors);
//return errors;