diff --git a/DSView/pv/data/decode/decoder.h b/DSView/pv/data/decode/decoder.h index 4f9d40adbf7c05505df49e30ad87945a54a59469..0309ae479daa39dde4429fbd2f2a4adfaa8e24ea 100755 --- a/DSView/pv/data/decode/decoder.h +++ b/DSView/pv/data/decode/decoder.h @@ -24,6 +24,9 @@ #include <map> #include <set> +#include <string> +#include <sstream> +#include <iostream> #include <boost/shared_ptr.hpp> diff --git a/DSView/pv/data/signaldata.cpp b/DSView/pv/data/signaldata.cpp index a4cd3af3b44bb4e999fb527508e6e645f31dd600..19005905f6e8157cb06367324758d88b1ff09db2 100755 --- a/DSView/pv/data/signaldata.cpp +++ b/DSView/pv/data/signaldata.cpp @@ -32,6 +32,8 @@ SignalData::SignalData() : { } +SignalData::~SignalData() {} + double SignalData::samplerate() const { return _samplerate; diff --git a/DSView/pv/data/signaldata.h b/DSView/pv/data/signaldata.h index f3e9c624a115e5eb94eeed032d74b57f7c8933cf..7ade4dddddc8609f9972d2608e24c73f8fb0bc42 100755 --- a/DSView/pv/data/signaldata.h +++ b/DSView/pv/data/signaldata.h @@ -34,7 +34,7 @@ class SignalData { public: SignalData(); - + virtual ~SignalData() = 0; public: double samplerate() const; void set_samplerate(double samplerate); diff --git a/DSView/pv/dialogs/calibration.cpp b/DSView/pv/dialogs/calibration.cpp index 5a42222d291f6713f83bf11ce3336981550ad3ae..362986227307bbfcf83e2dc36d8df29ec0a040b0 100755 --- a/DSView/pv/dialogs/calibration.cpp +++ b/DSView/pv/dialogs/calibration.cpp @@ -45,7 +45,7 @@ const QString Calibration::VCOMB = QT_TR_NOOP(" VCOMB"); Calibration::Calibration(QWidget *parent) : DSDialog(parent) { -#ifdef Q_OS_OSX +#ifdef Q_OS_DARWIN Qt::WindowFlags flags = windowFlags(); this->setWindowFlags(flags | Qt::Tool); #endif diff --git a/DSView/pv/view/xcursor.cpp b/DSView/pv/view/xcursor.cpp index 24e4e30061ef7231d28cabc11025bfd6b46bd8ea..2566505dc4e038885130d84e6b5e7e0247610c3f 100755 --- a/DSView/pv/view/xcursor.cpp +++ b/DSView/pv/view/xcursor.cpp @@ -50,7 +50,7 @@ XCursor::XCursor(View &view, QColor &colour, const std::vector< boost::shared_ptr<Signal> > sigs(_view.session().get_signals()); BOOST_FOREACH(const boost::shared_ptr<Signal> s, sigs) { boost::shared_ptr<DsoSignal> dsoSig; - if (dsoSig = dynamic_pointer_cast<DsoSignal>(s)) + if ((dsoSig = dynamic_pointer_cast<DsoSignal>(s))) if (dsoSig->enabled()) { _dsoSig = dsoSig; break; diff --git a/libsigrok4DSL/hardware/DSL/dscope.c b/libsigrok4DSL/hardware/DSL/dscope.c index 81174156867d4063c84e42d9aa98c77a13c4a1bd..df1a2fbe238bb9344e64aa80ed23dff1eed36315 100755 --- a/libsigrok4DSL/hardware/DSL/dscope.c +++ b/libsigrok4DSL/hardware/DSL/dscope.c @@ -1733,13 +1733,13 @@ static int dso_tune(const struct sr_dev_inst *sdi) else margin -= (devc->mstatus.ch1_acc_mean * 1.0 / devc->limit_samples); - if ((devc->tune_probe->coupling == SR_AC_COUPLING) && (abs(margin) < 0.5)) { + if ((devc->tune_probe->coupling == SR_AC_COUPLING) && (fabs(margin) < 0.5)) { devc->tune_probe->coupling = SR_DC_COUPLING; ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, devc->tune_probe, SR_CONF_PROBE_COUPLING)); } else if (devc->tune_probe->coupling == SR_AC_COUPLING){ (devc->tune_probe->vga_ptr+devc->tune_stage)->preoff += margin; ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, devc->tune_probe, SR_CONF_PROBE_OFFSET)); - } else if ((devc->tune_probe->coupling == SR_DC_COUPLING) && (abs(margin) < 0.5)) { + } else if ((devc->tune_probe->coupling == SR_DC_COUPLING) && (fabs(margin) < 0.5)) { devc->tune_stage++; if (devc->profile->dev_caps.vdivs[devc->tune_stage] != 0) { ret = dsl_wr_ext(sdi, 0x01, mux[devc->tune_stage]); diff --git a/libsigrok4DSL/libsigrok.h b/libsigrok4DSL/libsigrok.h index 77d01ebe41151c578a5c3800b97240fd6b8b6c3f..1409514d27a65243426b2e057ecdbf7957ae6c3f 100755 --- a/libsigrok4DSL/libsigrok.h +++ b/libsigrok4DSL/libsigrok.h @@ -1223,8 +1223,7 @@ struct sr_session { GSList *devs; /** List of struct datafeed_callback pointers. */ GSList *datafeed_callbacks; - GTimeVal starttime; - gboolean running; + gboolean running; unsigned int num_sources; diff --git a/libsigrok4DSL/output/srzip.c b/libsigrok4DSL/output/srzip.c index aa9af27df166b4c8a246c86845e144ee40ea212e..a4643636e9dd16cb3f6bcee79a0402a33220d9fd 100755 --- a/libsigrok4DSL/output/srzip.c +++ b/libsigrok4DSL/output/srzip.c @@ -299,7 +299,7 @@ static int cleanup(struct sr_output *o) static struct sr_option options[] = { { "filename", "Filename", "File to write", NULL, NULL }, - {0} + {0, 0, 0, 0, 0} }; static const struct sr_option *get_options(void)