From 28cd780d3b342a1c8fc8d279dfe1c48600163e5d Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 25 Feb 2017 11:20:16 +0100 Subject: [PATCH] Compiler Warning fixes Windows/Linux --- vdr.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/vdr.cc b/vdr.cc index c5a38d0..611e457 100644 --- a/vdr.cc +++ b/vdr.cc @@ -43,6 +43,7 @@ #include "seriesinfo.h" #include "osdvector.h" #include "tvmedia.h" +#include #define VOMP_PROTOCOLL_VERSION 0x00000400 @@ -1831,16 +1832,15 @@ SeriesInfo *VDR::getScraperSeriesInfo(int seriesID, int episodeID) ULONG VDR::loadTVMedia(TVMediaInfo& tvmedia) { -#warning VDR::loadTVMedia returns unsigned long but error return tries to return -1 VDR_RequestPacket vrp; - if (!vrp.init(VDR_LOADTVMEDIA, false, 0)) return -1; - if (!vrp.addULONG(tvmedia.type)) return -1; - if (!vrp.addULONG(tvmedia.primary_id)) return -1; - if (!vrp.addULONG(tvmedia.secondary_id)) return -1; - if (!vrp.addULONG(tvmedia.type_pict)) return -1; - if (!vrp.addULONG(tvmedia.container)) return -1; - if (!vrp.addULONG(tvmedia.container_member)) return -1; + if (!vrp.init(VDR_LOADTVMEDIA, false, 0)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.type)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.primary_id)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.secondary_id)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.type_pict)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.container)) return ULONG_MAX; + if (!vrp.addULONG(tvmedia.container_member)) return ULONG_MAX; /* Log::getInstance()->log("VDR", Log::DEBUG, "TVMedia with ID %d %d; %d %d %d %d;%d", tvmedia.primary_id,tvmedia.secondary_id,tvmedia.type,tvmedia.type_pict, tvmedia.container,tvmedia.container_member,vrp.getSerial());*/ @@ -1854,7 +1854,7 @@ ULONG VDR::loadTVMedia(TVMediaInfo& tvmedia) VDR_ResponsePacket* vresp = RequestResponse(&vrp); - //if (vresp->noResponse()) { delete vresp; return -1; } + //if (vresp->noResponse()) { delete vresp; return ULONG_MAX; } delete vresp; return vrp.getSerial(); @@ -1865,8 +1865,8 @@ ULONG VDR::loadTVMediaRecThumb(TVMediaInfo & media) VDR_RequestPacket vrp; - if (!vrp.init(VDR_LOADTVMEDIARECTHUMB, false, 0)) return -1; - if (!vrp.addString(media.primary_name.c_str())) return -1; + if (!vrp.init(VDR_LOADTVMEDIARECTHUMB, false, 0)) return ULONG_MAX; + if (!vrp.addString(media.primary_name.c_str())) return ULONG_MAX; VDR_PacketReceiver* vdrpr = new VDR_PacketReceiver(); vdrpr->receiverChannel = VDR::CHANNEL_TVMEDIA; @@ -1876,7 +1876,7 @@ ULONG VDR::loadTVMediaRecThumb(TVMediaInfo & media) VDR_ResponsePacket* vresp = RequestResponse(&vrp); - //if (vresp->noResponse()) { delete vresp; return -1; } + //if (vresp->noResponse()) { delete vresp; return ULONG_MAX; } delete vresp; return vrp.getSerial(); @@ -1887,9 +1887,9 @@ ULONG VDR::loadTVMediaEventThumb(TVMediaInfo & media) VDR_RequestPacket vrp; - if (!vrp.init(VDR_LOADTVMEDIAEVENTTHUMB, false, 0)) return -1; - if (!vrp.addULONG(media.primary_id)) return -1; - if (!vrp.addULONG(media.secondary_id)) return -1; + if (!vrp.init(VDR_LOADTVMEDIAEVENTTHUMB, false, 0)) return ULONG_MAX; + if (!vrp.addULONG(media.primary_id)) return ULONG_MAX; + if (!vrp.addULONG(media.secondary_id)) return ULONG_MAX; VDR_PacketReceiver* vdrpr = new VDR_PacketReceiver(); vdrpr->receiverChannel = VDR::CHANNEL_TVMEDIA; @@ -1899,7 +1899,7 @@ ULONG VDR::loadTVMediaEventThumb(TVMediaInfo & media) VDR_ResponsePacket* vresp = RequestResponse(&vrp); - //if (vresp->noResponse()) { delete vresp; return -1; } + //if (vresp->noResponse()) { delete vresp; return ULONG_MAX; } delete vresp; return vrp.getSerial(); @@ -1910,8 +1910,8 @@ ULONG VDR::loadChannelLogo(TVMediaInfo & media) VDR_RequestPacket vrp; - if (!vrp.init(VDR_LOADCHANNELLOGO, false, 0)) return -1; - if (!vrp.addULONG(media.primary_id)) return -1; + if (!vrp.init(VDR_LOADCHANNELLOGO, false, 0)) return ULONG_MAX; + if (!vrp.addULONG(media.primary_id)) return ULONG_MAX; VDR_PacketReceiver* vdrpr = new VDR_PacketReceiver(); vdrpr->receiverChannel = VDR::CHANNEL_TVMEDIA; @@ -1921,7 +1921,7 @@ ULONG VDR::loadChannelLogo(TVMediaInfo & media) VDR_ResponsePacket* vresp = RequestResponse(&vrp); - //if (vresp->noResponse()) { delete vresp; return -1; } + //if (vresp->noResponse()) { delete vresp; return ULONG_MAX; } delete vresp; // Log::getInstance()->log("VDR", Log::DEBUG, "TVMedia Channel Logo %d %x", -- 2.39.5