Commit 9af32655 authored by DreamSourceLab's avatar DreamSourceLab

Fix some compile warnings

parent 57b3f0ce
......@@ -24,6 +24,9 @@
#include <map>
#include <set>
#include <string>
#include <sstream>
#include <iostream>
#include <boost/shared_ptr.hpp>
......
......@@ -32,6 +32,8 @@ SignalData::SignalData() :
{
}
SignalData::~SignalData() {}
double SignalData::samplerate() const
{
return _samplerate;
......
......@@ -34,7 +34,7 @@ class SignalData
{
public:
SignalData();
virtual ~SignalData() = 0;
public:
double samplerate() const;
void set_samplerate(double samplerate);
......
......@@ -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
......
......@@ -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;
......
......@@ -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]);
......
......@@ -1223,7 +1223,6 @@ struct sr_session {
GSList *devs;
/** List of struct datafeed_callback pointers. */
GSList *datafeed_callbacks;
GTimeVal starttime;
gboolean running;
unsigned int num_sources;
......
......@@ -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)
......
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