From a16f165f19c35e493bf7c85fdd6fc07e57960d3b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 30 Sep 2013 20:50:31 +0200 Subject: [PATCH] initialize variables (mostly to silence valgrind) Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f485bceff7257d758a277619bba21d413b6737aa Author: Stefan Seyfried Date: 2013-09-30 (Mon, 30 Sep 2013) --- lib/timerdclient/timerdclient.h | 1 + src/gui/eventlist.cpp | 3 +++ src/timerd/timerd.cpp | 2 ++ src/timerd/timermanager.cpp | 1 + 4 files changed, 7 insertions(+) diff --git a/lib/timerdclient/timerdclient.h b/lib/timerdclient/timerdclient.h index f9e66625b..07e51f863 100644 --- a/lib/timerdclient/timerdclient.h +++ b/lib/timerdclient/timerdclient.h @@ -150,6 +150,7 @@ class CTimerdClient:private CBasicClient eventInfo.epgID = epgID; eventInfo.epg_starttime = epg_starttime; eventInfo.apids = apids; + eventInfo.recordingSafety = false; return addTimerEvent(CTimerd::TIMER_ZAPTO, &eventInfo, announcetime, alarmtime, stoptime); }; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 6d407787a..fdee6698f 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -221,6 +221,9 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id) evt.description = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); evt.eventID = 0; + evt.channelID = 0; + evt.startTime = 0; + evt.duration = 0; evtlist.push_back(evt); } diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index 5eb5c509e..8037b9db2 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -144,6 +144,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) for(CTimerEventMap::iterator lpos = events.begin();lpos != events.end();++lpos) { CTimerd::responseGetTimer lresp; + memset(&lresp, 0, sizeof(lresp)); /* valgrind... */ CTimerEvent *event = lpos->second; @@ -253,6 +254,7 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) CTimerdMsg::responseAddTimer rspAddTimer; CTimerEvent* event; CTimerd::TransferEventInfo evInfo; + rspAddTimer.eventID = 0; /* silence valgrind */ switch(msgAddTimer.eventType) { case CTimerd::TIMER_STANDBY : diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 4ae79b00c..eec444d50 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -63,6 +63,7 @@ void CTimerManager::Init(void) m_isTimeSet = false; timer_is_rec = false; wakeup = 0; + shutdown_eventID = -1; loadRecordingSafety(); //thread starten