[pan2] Fix error found by valgrind: Conditional jump or move depends on uninitialised value(s)
- From: Petr Kovář <pmkovar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] Fix error found by valgrind: Conditional jump or move depends on uninitialised value(s)
- Date: Fri, 18 Mar 2016 20:58:13 +0000 (UTC)
commit bbf5f293feefb1b6f3123172531016a15d64fa8c
Author: Olaf Seibert <rhialto falu nl>
Date: Sun Mar 13 22:22:18 2016 +0100
Fix error found by valgrind: Conditional jump or move depends on uninitialised value(s)
Conditional jump or move depends on uninitialised value(s)
at 0x470781: pan::Queue::task_states_t::get_state(pan::Task*) const (queue.h:138)
at 0x47078B: pan::Queue::task_states_t::get_state(pan::Task*) const (queue.h:138)
by 0x52748D: pan::Queue::get_stats(unsigned long&, unsigned long&, unsigned long&, unsigned long&,
double&, int&, int&, int&) (queue.cc:960)
by 0x464E59: pan::GUI::set_queue_size_label(unsigned int, unsigned int) (gui.cc:2282)
by 0x524B8D: fire_size_changed (queue.cc:512)
by 0x524B8D: pan::Queue::fire_if_counts_have_changed() (queue.cc:207)
by 0x522C1C: pan::Queue::add_tasks(std::vector<pan::Task*, std::allocator<pan::Task*> > const&,
pan::Queue::AddMode) (queue.cc:614)
by 0x525C1D: pan::Queue::add_task(pan::Task*, pan::Queue::AddMode) (queue.cc:582)
by 0x46F00D: pan::GUI::do_read_selected_group() (gui.cc:2056)
by 0x6A9D014: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AAF060: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AB7DFB: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x6AB812E: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.2)
by 0x50B499F: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.28)
pan/tasks/queue.cc | 6 ++++++
pan/tasks/queue.h | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/pan/tasks/queue.cc b/pan/tasks/queue.cc
index 0481964..69a46ba 100644
--- a/pan/tasks/queue.cc
+++ b/pan/tasks/queue.cc
@@ -33,6 +33,12 @@
using namespace pan;
+Queue :: task_states_t :: task_states_t ()
+ : _decoding (NULL)
+ , _encoding (NULL)
+{
+}
+
Queue :: Queue (ServerInfo & server_info,
TaskArchive & archive,
Data & data,
diff --git a/pan/tasks/queue.h b/pan/tasks/queue.h
index 9758b2d..16c8e6d 100644
--- a/pan/tasks/queue.h
+++ b/pan/tasks/queue.h
@@ -132,6 +132,7 @@ namespace pan
Task * _decoding;
Task * _encoding;
public:
+ task_states_t ();
tasks_t tasks;
TaskState get_state (Task* task) const {
if (_decoding && (task==_decoding)) return DECODING;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]