]> sigrok.org Git - pulseview.git/commitdiff
Fix two warnings
authorSoeren Apel <redacted>
Tue, 21 Aug 2018 19:04:22 +0000 (21:04 +0200)
committerSoeren Apel <redacted>
Tue, 21 Aug 2018 19:04:22 +0000 (21:04 +0200)
pv/prop/enum.cpp
pv/toolbars/mainbar.cpp

index 563f5384dc2313f9ab9448b7596462112c2454eb..f8e39bf95cd323d1f8303df113e6706537af3999 100644 (file)
@@ -56,7 +56,7 @@ Enum::Enum(QString name, QString desc,
        // std_gvar_min_max_step_thresholds()
 
        vector<double> deltas;
-       double prev_value;
+       double prev_value = 0;
 
        for (const pair<Glib::VariantBase, QString> &v : values_) {
                gdouble value;
index 9fcb42d123ec4a64af1da0d18cc1898d6a21d0e9..6d225369dda8516563160dec278167b63c6c3c9f 100644 (file)
@@ -509,8 +509,6 @@ void MainBar::commit_sample_rate()
        const shared_ptr<sigrok::Device> sr_dev = device->device();
 
        sample_rate = sample_rate_.value();
-       if (sample_rate < 0)
-               sample_rate_.set_value(0);
 
        try {
                sr_dev->config_set(ConfigKey::SAMPLERATE,