Eliminate some warnings

This commit is contained in:
kamel5 2019-03-23 13:43:37 +01:00
parent 168973331c
commit 10f6d90f16
8 changed files with 31 additions and 32 deletions

View File

@ -69,7 +69,7 @@ const char* cChannelGroups::GetPrev(int group) {
const char* cChannelGroups::GetNext(int group) {
if (group > -1) {
if ((group+1) < channelGroups.size())
if ((group+1) < (int)channelGroups.size())
return channelGroups[group+1].GetName();
}
return "";
@ -89,7 +89,7 @@ int cChannelGroups::GetNextGroupChannelNumber(const cChannel *channel) {
int currentGroup = GetGroup(channel);
if (currentGroup == -1)
return 0;
if ((currentGroup+1) < channelGroups.size()) {
if ((currentGroup+1) < (int)channelGroups.size()) {
return channelGroups[currentGroup+1].StartChannel();
}
return 0;

View File

@ -10,8 +10,8 @@ private:
int channel;
cChannelGroups *channelGroups;
int maxChannels;
int startTime;
int timeout;
long unsigned int startTime;
long unsigned int timeout;
cPixmap *pixmapBack;
cPixmap *pixmapText;
void SetPixmaps(void);
@ -26,4 +26,4 @@ public:
int GetChannel(void) { return channel; };
};
#endif //__TVGUIDE_CHANNELJUMP_H
#endif //__TVGUIDE_CHANNELJUMP_H

32
grid.h
View File

@ -20,38 +20,38 @@ protected:
bool hasTimer;
bool hasSwitchTimer;
bool intersects(cGrid *neighbor);
virtual time_t Duration(void) {};
virtual time_t Duration(void) { return 0; };
virtual void drawText(void) {};
bool dummy;
public:
cGrid(cChannelColumn *c);
virtual ~cGrid(void);
cChannelColumn *column;
virtual void SetViewportHeight() {};
virtual void PositionPixmap() {};
virtual void SetViewportHeight(void) {};
virtual void PositionPixmap(void) {};
virtual void setText(void) {};
void Draw();
void SetDirty() {dirty = true;};
void SetActive() {dirty = true; active = true;};
void SetInActive() {dirty = true; active = false;};
void Draw(void);
void SetDirty(void) {dirty = true;};
void SetActive(void) {dirty = true; active = true;};
void SetInActive(void) {dirty = true; active = false;};
void SetColor(bool color) {isColor1 = color;};
bool IsColor1() {return isColor1;};
bool IsColor1(void) {return isColor1;};
bool isFirst(void);
virtual const cEvent *GetEvent() {};
virtual const cEvent *GetEvent(void) { return NULL; };
bool Match(time_t t);
virtual time_t StartTime() {};
virtual time_t EndTime() {};
virtual time_t StartTime(void) { return 0; };
virtual time_t EndTime(void) { return 0; };
virtual void SetStartTime(time_t start) {};
virtual void SetEndTime(time_t end) {};
int calcOverlap(cGrid *neighbor);
virtual void SetTimer() {};
virtual void SetSwitchTimer() {};
virtual void SetTimer(void) {};
virtual void SetSwitchTimer(void) {};
virtual cString getText(void) { return cString("");};
virtual cString getTimeString(void) { return cString("");};
bool Active(void) { return active; };
bool HasTimer() {return hasTimer;};
bool HasSwitchTimer() {return hasSwitchTimer;};
bool isDummy() { return dummy; };
bool HasTimer(void) {return hasTimer;};
bool HasSwitchTimer(void) {return hasSwitchTimer;};
bool isDummy(void) { return dummy; };
virtual void debug() {};
};

View File

@ -351,7 +351,7 @@ cImage *cImageCache::GetLogo(const cChannel *channel) {
} else {
bool success = LoadLogo(channel);
if (success) {
if ((tvguideConfig.limitLogoCache) && (logoCache.size() >= tvguideConfig.numLogosMax)) {
if ((tvguideConfig.limitLogoCache) && ((int)logoCache.size() >= tvguideConfig.numLogosMax)) {
//logo cache is full, don't cache anymore
if (tempStaticLogo) {
delete tempStaticLogo;

View File

@ -173,7 +173,7 @@ void cImageLoader::CreateGradient(tColor back, tColor blend, int width, int heig
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
PixelPacket *pixel = pixels + y * width + x;
int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
}
}
@ -183,4 +183,4 @@ void cImageLoader::CreateGradient(tColor back, tColor blend, int width, int heig
imgback.composite(imgblend, 0, 0, OverCompositeOp);
buffer = imgback;
}
}

View File

@ -145,7 +145,7 @@ void cImageMagickWrapper::CreateGradient(tColor back, tColor blend, int width, i
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
PixelPacket *pixel = pixels + y * width + x;
int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
}
}
@ -159,4 +159,4 @@ void cImageMagickWrapper::CreateGradient(tColor back, tColor blend, int width, i
void cImageMagickWrapper::CreateBackground(tColor back, tColor blend, int width, int height) {
CreateGradient(back, blend, width, height, 0.8, 0.8);
}
}

View File

@ -85,7 +85,7 @@ cRecMenuItem *cRecMenuAskFolder::GetMenuItem(int number) {
if (number == 0) {
cRecMenuItem *result = new cRecMenuItemButton(tr("root video folder"), rmsInstantRecord, false, false, true);
return result;
} else if ((number > 0) && (number < folders.size()+1)) {
} else if ((number > 0) && (number < (int)folders.size() + 1)) {
cRecMenuItem *result = new cRecMenuItemButton(folders[number-1].c_str(), rmsInstantRecord, false, false, true);
return result;
}
@ -99,7 +99,7 @@ int cRecMenuAskFolder::GetTotalNumMenuItems(void) {
std::string cRecMenuAskFolder::GetFolder(void) {
std::string folder = "";
int folderActive = GetActive();
if (folderActive > 0 && folderActive < folders.size() + 1)
if (folderActive > 0 && folderActive < (int)folders.size() + 1)
folder = folders[folderActive - 1];
return folder;
}
@ -275,7 +275,7 @@ cRecMenuTimerConflict::cRecMenuTimerConflict(cTVGuideTimerConflict *conflict) {
}
cRecMenuItem *cRecMenuTimerConflict::GetMenuItem(int number) {
if ((number >= 0) && (number < conflict->timerIDs.size())) {
if ((number >= 0) && (number < (int)conflict->timerIDs.size())) {
#if VDRVERSNUM >= 20301
LOCK_TIMERS_READ;
const cTimer *timer = Timers->Get(conflict->timerIDs[number]);
@ -677,7 +677,7 @@ int cRecMenuSearchTimerTemplates::GetTotalNumMenuItems(void) {
TVGuideEPGSearchTemplate cRecMenuSearchTimerTemplates::GetTemplate(void) {
TVGuideEPGSearchTemplate templ;
int tmplActive = GetActive() - 1;
if (tmplActive >= 0 && tmplActive < templates.size())
if (tmplActive >= 0 && tmplActive < (int)templates.size())
templ = templates[tmplActive];
return templ;
}

3
view.c
View File

@ -122,7 +122,6 @@ void cView::DrawHeader(void) {
//REC Icon
eTimerMatch timerMatch=tmNone;
#if VDRVERSNUM >= 20301
// LOCK_TIMERS_READ;
const cTimer *ti;
#else
cTimer *ti;
@ -284,7 +283,7 @@ void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFu
std::stringstream sstrTextTall;
std::stringstream sstrTextFull;
for (int i=0; i<flds.size(); i++) {
for (int i = 0; i < (int)flds.size(); i++) {
if (!flds[i].size()) {
//empty line
linesDrawn++;