From: Soeren Apel Date: Tue, 21 Aug 2018 19:04:22 +0000 (+0200) Subject: Fix two warnings X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2d20774fe218b2b72169fbbc37f161b7b2b6f410;p=pulseview.git Fix two warnings --- diff --git a/pv/prop/enum.cpp b/pv/prop/enum.cpp index 563f5384..f8e39bf9 100644 --- a/pv/prop/enum.cpp +++ b/pv/prop/enum.cpp @@ -56,7 +56,7 @@ Enum::Enum(QString name, QString desc, // std_gvar_min_max_step_thresholds() vector deltas; - double prev_value; + double prev_value = 0; for (const pair &v : values_) { gdouble value; diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 9fcb42d1..6d225369 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -509,8 +509,6 @@ void MainBar::commit_sample_rate() const shared_ptr 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,