Commit 9af32655 authored by DreamSourceLab's avatar DreamSourceLab

Fix some compile warnings

parent 57b3f0ce
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
#include <map> #include <map>
#include <set> #include <set>
#include <string>
#include <sstream>
#include <iostream>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
......
...@@ -32,6 +32,8 @@ SignalData::SignalData() : ...@@ -32,6 +32,8 @@ SignalData::SignalData() :
{ {
} }
SignalData::~SignalData() {}
double SignalData::samplerate() const double SignalData::samplerate() const
{ {
return _samplerate; return _samplerate;
......
...@@ -34,7 +34,7 @@ class SignalData ...@@ -34,7 +34,7 @@ class SignalData
{ {
public: public:
SignalData(); SignalData();
virtual ~SignalData() = 0;
public: public:
double samplerate() const; double samplerate() const;
void set_samplerate(double samplerate); void set_samplerate(double samplerate);
......
...@@ -45,7 +45,7 @@ const QString Calibration::VCOMB = QT_TR_NOOP(" VCOMB"); ...@@ -45,7 +45,7 @@ const QString Calibration::VCOMB = QT_TR_NOOP(" VCOMB");
Calibration::Calibration(QWidget *parent) : Calibration::Calibration(QWidget *parent) :
DSDialog(parent) DSDialog(parent)
{ {
#ifdef Q_OS_OSX #ifdef Q_OS_DARWIN
Qt::WindowFlags flags = windowFlags(); Qt::WindowFlags flags = windowFlags();
this->setWindowFlags(flags | Qt::Tool); this->setWindowFlags(flags | Qt::Tool);
#endif #endif
......
...@@ -50,7 +50,7 @@ XCursor::XCursor(View &view, QColor &colour, ...@@ -50,7 +50,7 @@ XCursor::XCursor(View &view, QColor &colour,
const std::vector< boost::shared_ptr<Signal> > sigs(_view.session().get_signals()); const std::vector< boost::shared_ptr<Signal> > sigs(_view.session().get_signals());
BOOST_FOREACH(const boost::shared_ptr<Signal> s, sigs) { BOOST_FOREACH(const boost::shared_ptr<Signal> s, sigs) {
boost::shared_ptr<DsoSignal> dsoSig; boost::shared_ptr<DsoSignal> dsoSig;
if (dsoSig = dynamic_pointer_cast<DsoSignal>(s)) if ((dsoSig = dynamic_pointer_cast<DsoSignal>(s)))
if (dsoSig->enabled()) { if (dsoSig->enabled()) {
_dsoSig = dsoSig; _dsoSig = dsoSig;
break; break;
......
...@@ -1733,13 +1733,13 @@ static int dso_tune(const struct sr_dev_inst *sdi) ...@@ -1733,13 +1733,13 @@ static int dso_tune(const struct sr_dev_inst *sdi)
else else
margin -= (devc->mstatus.ch1_acc_mean * 1.0 / devc->limit_samples); 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; devc->tune_probe->coupling = SR_DC_COUPLING;
ret = dsl_wr_dso(sdi, dso_cmd_gen(sdi, devc->tune_probe, SR_CONF_PROBE_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){ } else if (devc->tune_probe->coupling == SR_AC_COUPLING){
(devc->tune_probe->vga_ptr+devc->tune_stage)->preoff += margin; (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)); 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++; devc->tune_stage++;
if (devc->profile->dev_caps.vdivs[devc->tune_stage] != 0) { if (devc->profile->dev_caps.vdivs[devc->tune_stage] != 0) {
ret = dsl_wr_ext(sdi, 0x01, mux[devc->tune_stage]); ret = dsl_wr_ext(sdi, 0x01, mux[devc->tune_stage]);
......
...@@ -1223,8 +1223,7 @@ struct sr_session { ...@@ -1223,8 +1223,7 @@ struct sr_session {
GSList *devs; GSList *devs;
/** List of struct datafeed_callback pointers. */ /** List of struct datafeed_callback pointers. */
GSList *datafeed_callbacks; GSList *datafeed_callbacks;
GTimeVal starttime; gboolean running;
gboolean running;
unsigned int num_sources; unsigned int num_sources;
......
...@@ -299,7 +299,7 @@ static int cleanup(struct sr_output *o) ...@@ -299,7 +299,7 @@ static int cleanup(struct sr_output *o)
static struct sr_option options[] = { static struct sr_option options[] = {
{ "filename", "Filename", "File to write", NULL, NULL }, { "filename", "Filename", "File to write", NULL, NULL },
{0} {0, 0, 0, 0, 0}
}; };
static const struct sr_option *get_options(void) static const struct sr_option *get_options(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment