Changes to silence compiler warnings on OSX
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 @@
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 @@
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 @@
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;