summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY3
-rw-r--r--epg.h4
-rw-r--r--libsi/section.h16
-rw-r--r--libsi/util.h14
-rw-r--r--recording.c4
6 files changed, 22 insertions, 20 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 82a09374..128d8207 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1134,6 +1134,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for fixing handling subtitle color palettes on channels where subtitles appear
"word by word"
for reporting a problem with color palettes in subtitles
+ for adding some typecasts to silence gcc compiler warnings
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
diff --git a/HISTORY b/HISTORY
index f2b73f6e..b263879b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6889,7 +6889,7 @@ Video Disk Recorder Revision History
- Fixed switching into time shift mode when pausing live video (thanks to Reinhard
Nissl for helping to debug this one).
-2012-02-25: Version 1.7.25
+2012-02-26: Version 1.7.25
- The fps value for channels where it differs from the default is now set correctly
when pausing live video.
@@ -6922,3 +6922,4 @@ Video Disk Recorder Revision History
EPG source can fill the schedules with EPG data that will not be messed up with
that from the DVB data stream. Note, though, that this means VDR can not do VPS
controlled recordings with such events!
+- Added some typecasts to silence gcc compiler warnings (thanks to Rolf Ahrenberg).
diff --git a/epg.h b/epg.h
index 9d6b605b..580cbe6b 100644
--- a/epg.h
+++ b/epg.h
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.h 2.6 2012/02/11 12:29:55 kls Exp $
+ * $Id: epg.h 2.7 2012/02/26 13:58:26 kls Exp $
*/
#ifndef __EPG_H
@@ -100,7 +100,7 @@ public:
const char *ShortText(void) const { return shortText; }
const char *Description(void) const { return description; }
const cComponents *Components(void) const { return components; }
- uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : 0; }
+ uchar Contents(int i = 0) const { return (0 <= i && i < MaxEventContents) ? contents[i] : uchar(0); }
int ParentalRating(void) const { return parentalRating; }
time_t StartTime(void) const { return startTime; }
time_t EndTime(void) const { return startTime + duration; }
diff --git a/libsi/section.h b/libsi/section.h
index 29af7f4b..5b70a220 100644
--- a/libsi/section.h
+++ b/libsi/section.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: section.h 1.4 2006/04/14 10:53:44 kls Exp $
+ * $Id: section.h 2.1 2012/02/26 13:58:26 kls Exp $
* *
***************************************************************************/
@@ -29,7 +29,7 @@ public:
int getServiceId() const;
int getPid() const;
bool isNITPid() const { return getServiceId()==0; }
- virtual int getLength() { return sizeof(pat_prog); }
+ virtual int getLength() { return int(sizeof(pat_prog)); }
protected:
virtual void Parse();
private:
@@ -61,7 +61,7 @@ public:
int getPid() const;
int getStreamType() const;
DescriptorLoop streamDescriptors;
- virtual int getLength() { return sizeof(pmt_info)+streamDescriptors.getLength(); }
+ virtual int getLength() { return int(sizeof(pmt_info)+streamDescriptors.getLength()); }
protected:
virtual void Parse();
private:
@@ -96,7 +96,7 @@ public:
public:
int getTransportStreamId() const;
int getOriginalNetworkId() const;
- virtual int getLength() { return sizeof(ni_ts)+transportStreamDescriptors.getLength(); }
+ virtual int getLength() { return int(sizeof(ni_ts)+transportStreamDescriptors.getLength()); }
DescriptorLoop transportStreamDescriptors;
protected:
virtual void Parse();
@@ -131,7 +131,7 @@ public:
int getEITpresentFollowingFlag() const;
RunningStatus getRunningStatus() const;
int getFreeCaMode() const;
- virtual int getLength() { return sizeof(sdt_descr)+serviceDescriptors.getLength(); }
+ virtual int getLength() { return int(sizeof(sdt_descr)+serviceDescriptors.getLength()); }
DescriptorLoop serviceDescriptors;
protected:
virtual void Parse();
@@ -168,7 +168,7 @@ public:
int getFreeCaMode() const;
DescriptorLoop eventDescriptors;
- virtual int getLength() { return sizeof(eit_event)+eventDescriptors.getLength(); }
+ virtual int getLength() { return int(sizeof(eit_event)+eventDescriptors.getLength()); }
protected:
virtual void Parse();
private:
@@ -225,7 +225,7 @@ public:
int getServiceId() const;
int getEventId() const;
RunningStatus getRunningStatus() const;
- virtual int getLength() { return sizeof(rst_info); }
+ virtual int getLength() { return int(sizeof(rst_info)); }
protected:
virtual void Parse();
private:
@@ -242,7 +242,7 @@ public:
AIT() {}
class Application : public LoopElement {
public:
- virtual int getLength() { return sizeof(ait_app)+applicationDescriptors.getLength(); }
+ virtual int getLength() { return int(sizeof(ait_app)+applicationDescriptors.getLength()); }
long getOrganisationId() const;
int getApplicationId() const;
int getControlCode() const;
diff --git a/libsi/util.h b/libsi/util.h
index e9134cd4..a7f5d602 100644
--- a/libsi/util.h
+++ b/libsi/util.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: util.h 2.2 2010/11/01 15:24:32 kls Exp $
+ * $Id: util.h 2.3 2012/02/26 13:58:26 kls Exp $
* *
***************************************************************************/
@@ -54,10 +54,10 @@ public:
template <typename T> const T* getData(int offset) const { return (T*)(data_->data+offset+off); }
//sets p to point to data+offset, increments offset
template <typename T> void setPointerAndOffset(const T* &p, int &offset) const { p=(T*)getData(offset); offset+=sizeof(T); }
- unsigned char operator[](const int index) const { return data_->data ? data_->data[off+index] : 0; }
+ unsigned char operator[](const int index) const { return data_->data ? data_->data[off+index] : (unsigned char)0; }
int getLength() const { return data_->size; }
- u_int16_t TwoBytes(const int index) const { return data_->data ? data_->TwoBytes(off+index) : 0; }
- u_int32_t FourBytes(const int index) const { return data_->data ? data_->FourBytes(off+index) : 0; }
+ u_int16_t TwoBytes(const int index) const { return data_->data ? data_->TwoBytes(off+index) : u_int16_t(0); }
+ u_int32_t FourBytes(const int index) const { return data_->data ? data_->FourBytes(off+index) : u_int32_t(0); }
bool isValid() const { return data_->valid; }
bool checkSize(int offset) { return (data_->valid && (data_->valid=(offset>=0 && off+offset < data_->size))); }
@@ -73,9 +73,9 @@ private:
virtual void Delete() = 0;
u_int16_t TwoBytes(const int index) const
- { return (data[index] << 8) | data[index+1]; }
+ { return u_int16_t((data[index] << 8) | data[index+1]); }
u_int32_t FourBytes(const int index) const
- { return (data[index] << 24) | (data[index+1] << 16) | (data[index+2] << 8) | data[index+3]; }
+ { return u_int32_t((data[index] << 24) | (data[index+1] << 16) | (data[index+2] << 8) | data[index+3]); }
/*#ifdef CHARARRAY_THREADSAFE
void Lock();
void Unlock();
@@ -140,7 +140,7 @@ private:
namespace DVBTime {
time_t getTime(unsigned char date_hi, unsigned char date_lo, unsigned char timehr, unsigned char timemi, unsigned char timese);
time_t getDuration(unsigned char timehr, unsigned char timemi, unsigned char timese);
-inline unsigned char bcdToDec(unsigned char b) { return ((b >> 4) & 0x0F) * 10 + (b & 0x0F); }
+inline unsigned char bcdToDec(unsigned char b) { return (unsigned char)(((b >> 4) & 0x0F) * 10 + (b & 0x0F)); }
}
//taken and adapted from libdtv, (c) Rolf Hakenes
diff --git a/recording.c b/recording.c
index 7617d734..47a9881a 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 2.50 2012/02/19 10:44:45 kls Exp $
+ * $Id: recording.c 2.51 2012/02/26 13:58:26 kls Exp $
*/
#include "recording.h"
@@ -1571,7 +1571,7 @@ cIndexFile::cIndexFile(const char *FileName, bool Record, bool IsPesRecording, b
if (!Record && PauseLive) {
// Wait until the index file contains at least two frames:
time_t tmax = time(NULL) + MAXWAITFORINDEXFILE;
- while (time(NULL) < tmax && FileSize(fileName) < 2 * sizeof(tIndexTs))
+ while (time(NULL) < tmax && FileSize(fileName) < off_t(2 * sizeof(tIndexTs)))
cCondWait::SleepMs(INDEXFILETESTINTERVAL);
}
int delta = 0;