From 2a64092f057ae652c40f118c30cab7f1240120e9 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 25 Jan 2017 14:39:59 +0000 Subject: [PATCH] Some more compiler warning fixes --- boxx.cc | 8 ++++---- player.cc | 21 ++++----------------- vepg.cc | 4 ++-- vepglistadvanced.cc | 6 +++--- vepgsummary.cc | 6 +++--- vopts.cc | 6 ++++-- 6 files changed, 20 insertions(+), 31 deletions(-) diff --git a/boxx.cc b/boxx.cc index e775ea8..e6d7a61 100644 --- a/boxx.cc +++ b/boxx.cc @@ -575,8 +575,8 @@ Surface* Boxx::getSurface() bool Boxx::mouseMove(int x, int y) { - if ((x >= area.x) && (x= area.y) && (y < area.y2())) + if ((x >= (int)area.x) && (x<(int)area.x2()) + && (y >= (int)area.y) && (y < (int)area.y2())) { return true; } @@ -588,8 +588,8 @@ bool Boxx::mouseMove(int x, int y) bool Boxx::mouseLBDOWN(int x, int y) { - if ((x >= area.x) && (x= area.y) && (y < area.y2())) + if ((x >= (int)area.x) && (x<(int)area.x2()) + && (y >= (int)area.y) && (y < (int)area.y2())) { return true; } diff --git a/player.cc b/player.cc index c93c733..e1cc01b 100644 --- a/player.cc +++ b/player.cc @@ -1225,30 +1225,17 @@ void Player::threadPTSFeedScan() UINT playtime=0; -#ifndef WIN32 - struct timeval clock0 = {0,0}; // Time stamp after fetching I-frame info - struct timeval clock1 = {0,0}; // Time stamp after fetching I-frame data - struct timeval clock2 = {0,0} ; // Time stamp after displaying I-frame -#else - DWORD clock0 = 0, clock1 = 0, clock2 = 0; -#endif - int frameTimeOffset = 0; // Time in msec between frames - int disp_msec = 0; // Time taken to display data - int total_msec = 0; // Time taken to fetch data and display it - int sleepTime = 0; - if (state == S_FFWD) { - direction = 1; // and 0 for backward - dir_fac=1; + if (state == S_FFWD) + { + direction = 1; // and 0 for backward + dir_fac = 1; } video->EnterIframePlayback(); while(1) { - // Fetch I-frames until we get one that can be displayed in good time - // Repeat while clock0 + total_msec > clock2 + frameTimeOffset - baseFrameNumber = currentfeedFrameNumber; threadCheckExit(); diff --git a/vepg.cc b/vepg.cc index 6f2b800..dac571d 100644 --- a/vepg.cc +++ b/vepg.cc @@ -528,7 +528,7 @@ void VEpg::drawgrid() // redraws grid and select programme listTop = chanListbox.getTopOption(); updateEventList(); } - if ((selTime >= ltime + window_width * 60) || (selTime <= ltime)) + if ((selTime >= ltime + (int)window_width * 60) || (selTime <= ltime)) { // we have cursored back before left time of window //TODO check that this and above don't happen together @@ -716,7 +716,7 @@ void VEpg::paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawS //if (w > 155 + MINUTE_SCALE * WINDOW_WIDTH -x) // w = w + x - 155 - MINUTE_SCALE * WINDOW_WIDTH; // ends outside window } - if (w > 155 + window_width * MINUTE_SCALE - x) + if (w > 155 + (int)window_width * MINUTE_SCALE - x) w = 155 + window_width * MINUTE_SCALE -x; // limit cells to RHS of window rectangle(x, y, w, h, bg); char* tt = new char[strlen(event->title) + 1]; diff --git a/vepglistadvanced.cc b/vepglistadvanced.cc index 22fb0a2..e7f3d4e 100644 --- a/vepglistadvanced.cc +++ b/vepglistadvanced.cc @@ -288,7 +288,7 @@ void VEpgListAdvanced::doRecord() for(listIndex = 0; listIndex < chanlistsize; listIndex++) { chan = (*chanList)[listIndex]; - if (chan->number == channel) break; + if ((int)chan->number == channel) break; } Log::getInstance()->log("VEpgSummary", Log::DEBUG, "ID %lu TIME %lu DURATION %lu TITLE %s", current->id, current->time, @@ -529,7 +529,7 @@ void VEpgListAdvanced::drawDataNowNext(bool next, bool doIndexPop) chan = (*chanList)[listIndex]; EventList* eventList = eventLista[listIndex]; - if (eventList && eventList->size()>=minevents) { + if (eventList && ((int)eventList->size() >= minevents)) { j = eventList->begin(); currentEvent = j[minevents-1]; @@ -835,7 +835,7 @@ int VEpgListAdvanced::handleCommand(int command) for(listIndex = 0; listIndex < chanlistsize; listIndex++) { chan = (*chanList)[listIndex]; - if (chan->number == channel) break; + if ((int)chan->number == channel) break; } VEpgSummary* vr = new VEpgSummary(current, (*chanList)[listIndex]); diff --git a/vepgsummary.cc b/vepgsummary.cc index b60aa32..188dede 100644 --- a/vepgsummary.cc +++ b/vepgsummary.cc @@ -233,9 +233,9 @@ void VEpgSummary::processMessage(Message* m) if (cancel) { //check if press is outside this view! then simulate cancel - int x=(m->parameter.num>>16)-getScreenX(); - int y=(m->parameter.num&0xFFFF)-getScreenY(); - if (x<0 || y <0 || x>(int)getWidth() || y>(int)getHeight()) + int checkX=(m->parameter.num>>16)-getScreenX(); + int checkY=(m->parameter.num&0xFFFF)-getScreenY(); + if (checkX<0 || checkY <0 || checkX>(int)getWidth() || checkY>(int)getHeight()) { BoxStack::getInstance()->handleCommand(Remote::BACK); //simulate cancel press } diff --git a/vopts.cc b/vopts.cc index 00d8919..66bb4b0 100644 --- a/vopts.cc +++ b/vopts.cc @@ -65,16 +65,18 @@ VOpts::VOpts() WOptionPane* wop; // --- edit options start here - +#ifdef MVP_REMOTE_TYPES static const char* options1[] = {"Old", "New"}; - +#endif static const char* options5[] = {"Chop sides", "Letterbox"}; static const char* options6[] = {"On", "Off", "Last state"}; static const char* options7[] = {"All", "FTA only"}; static const char* options15[] = {"Alphabetical", "Chronological"}; static const char* options13[] = {"Auto","1024", "2048", "4096", "8192", "16384", "32768", "65536"}; +#ifdef PAL_WSS static const char* options14[] = {"No", "Yes"}; +#endif static const char* options18[] = {"Off", "On"}; #ifdef ADVANCED_MENUES static const char* options19[] = { "Advanced","Classic"}; -- 2.39.2