From ba600f0e5ce176a88d369a8bec16edf048242753 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 23 Aug 2017 12:58:26 +0200 Subject: [PATCH] some inits and never read var --- lib/libmd5sum/md5.c | 2 +- lib/libtuxtxt/tuxtxt_common.h | 3 ++- src/gui/eventlist.cpp | 3 +-- src/gui/infoviewer.cpp | 1 - src/gui/movieplayer.cpp | 2 -- src/gui/opkg_manager.cpp | 1 + src/nhttpd/tuxboxapi/neutrinoyparser.cpp | 4 ++++ src/zapit/src/frontend.cpp | 1 + 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/libmd5sum/md5.c b/lib/libmd5sum/md5.c index e433782e8..aece50d10 100644 --- a/lib/libmd5sum/md5.c +++ b/lib/libmd5sum/md5.c @@ -132,7 +132,7 @@ md5_stream (stream, resblock) /* Important: BLOCKSIZE must be a multiple of 64. */ #define BLOCKSIZE 4096 struct md5_ctx ctx; - char buffer[BLOCKSIZE + 72]; + char buffer[BLOCKSIZE + 72] = {0}; size_t sum; /* Initialize the computation context. */ diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 52f9d419e..c6e6c7bd8 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -704,8 +704,9 @@ void *tuxtxt_CacheThread(void * /*arg*/) tuxtxt_cache.current_subpage[magazine] = -1; continue; } - +#if 0 /* ? */ b1 &= 3; +#endif b3 &= 7; if (tuxtxt_is_dec(tuxtxt_cache.page_receiving)) /* ignore other subpage bits for hex pages */ diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 76c7d5cdf..7f17c199d 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -265,7 +265,6 @@ void CEventList::readEvents(const t_channel_id channel_id) void CEventList::getChannelNames(t_channel_id &channel_id, std::string ¤t_channel_name, std::string &prev_channel_name, std::string &next_channel_name, neutrino_msg_t msg) { t_bouquet_id current_bouquet_id = bouquetList->getActiveBouquetNumber(); - t_channel_id channel_id_tmp = channel_id; const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize(); if(channel_nr < 2){ channel_id = 0; @@ -274,7 +273,7 @@ void CEventList::getChannelNames(t_channel_id &channel_id, std::string ¤t_ unsigned int tmp_channel = 0; for(unsigned int channel = 0; channel < channel_nr; channel++) { - channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); + t_channel_id channel_id_tmp = bouquetList->Bouquets[current_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID(); if(channel_id_tmp == channel_id){ if ( msg==CRCInput::RC_right || msg==CRCInput::RC_forward ) { channel = (channel+1) %channel_nr; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 68b29cadc..323084f09 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1073,7 +1073,6 @@ void CInfoViewer::loop(bool show_dot) //printf("%s:%d: imitate VZAP; RC_left/right\n", __func__, __LINE__); CMoviePlayerGui::getInstance().setFromInfoviewer(true); g_RCInput->postMsg (msg, data); - hideIt = true; } else setSwitchMode(IV_MODE_VIRTUAL_ZAP); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 786a340cd..a18773a4b 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1472,7 +1472,6 @@ void CMoviePlayerGui::PlayFileLoop(void) disableOsdElements(MUTE); CFileBrowser *playlist = new CFileBrowser(); CFile *pfile = NULL; - pfile = &(*filelist_it); int selected = std::distance( filelist.begin(), filelist_it ); filelist_it = filelist.end(); if (playlist->playlist_manager(filelist, selected)) @@ -2451,7 +2450,6 @@ bool CMoviePlayerGui::convertSubtitle(std::string &text) else { memset(buf + (len - olen), 0, olen); text = buf; - ret = true; } free(buf); diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 5276bbc76..be5029a3b 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -671,6 +671,7 @@ string COPKGManager::getPkgDescription(std::string pkgName, std::string pkgDesc) return pkgDesc; fpos_t fz; + fz.__pos = 0; fseek(fd, 0, SEEK_END); fgetpos(fd, &fz); fseek(fd, 0, SEEK_SET); diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 04dd13a4f..50f14c4b9 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -1023,6 +1023,10 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin unsigned timerId=0; std::string cmd, stimerid; CTimerd::responseGetTimer timer; // Timer + timer.alarmTime = 0; + timer.stopTime = 0; + timer.apids = 0; + timer.eventType = CTimerd::__TIMER_NEXTPROGRAM;//nothing time_t now_t = time(NULL); ySplitString(para, " ", cmd, stimerid); if(cmd != "new") diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 215a58ea2..26482d2b1 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -603,6 +603,7 @@ uint32_t CFrontend::getRate() const fe_status_t CFrontend::getStatus(void) const { struct dvb_frontend_event event; + event.status = FE_REINIT; fop(ioctl, FE_READ_STATUS, &event.status); return (fe_status_t) (event.status & FE_HAS_LOCK); }