1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed some compiler warnings with Clang 3.4.1

This commit is contained in:
Klaus Schmidinger 2014-02-08 13:00:39 +01:00
parent bfb9c8fddd
commit e5fde77e56
10 changed files with 16 additions and 20 deletions

View File

@ -2907,6 +2907,7 @@ Paul Menzel <paulepanter@users.sourceforge.net>
for reporting a possible memory leak in the "pictures" plugin for reporting a possible memory leak in the "pictures" plugin
for removing an obsolete local variable in dvbsdffosd.c for removing an obsolete local variable in dvbsdffosd.c
for reporting a possible NULL pointer dereference in osddemo.c for reporting a possible NULL pointer dereference in osddemo.c
for reporting some compiler warnings with Clang 3.4.1
Radek Stastny <dedkus@gmail.com> Radek Stastny <dedkus@gmail.com>
for translating OSD texts to the Czech language for translating OSD texts to the Czech language

View File

@ -8170,7 +8170,7 @@ Video Disk Recorder Revision History
- Fixed a superfluous call to the skin's SetRecording() function after renaming a - Fixed a superfluous call to the skin's SetRecording() function after renaming a
recording (reported by Christoph Haubrich). recording (reported by Christoph Haubrich).
2014-02-06: Version 2.1.5 2014-02-08: Version 2.1.5
- Now checking whether the primary device actually has a decoder before retuning the - Now checking whether the primary device actually has a decoder before retuning the
current channel after a change in its parameters. This fixes broken recordings on current channel after a change in its parameters. This fixes broken recordings on
@ -8191,3 +8191,4 @@ Video Disk Recorder Revision History
1.7.32, because these will automatically adjust editing marks to I-frames. 1.7.32, because these will automatically adjust editing marks to I-frames.
Users of stable releases shouldn't notice any problems. Users of stable releases shouldn't notice any problems.
- Fixed a possible crash in the OSD demo (reported by Christopher Reimer). - Fixed a possible crash in the OSD demo (reported by Christopher Reimer).
- Fixed some compiler warnings with Clang 3.4.1 (reported by Paul Menzel).

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * See the README file for copyright information and how to reach the author.
* *
* $Id: player.c 2.2 2012/04/28 11:58:15 kls Exp $ * $Id: player.c 3.1 2014/02/08 12:48:12 kls Exp $
*/ */
#include "player.h" #include "player.h"
@ -211,7 +211,7 @@ cString cPictureControl::GetHeader(void)
eOSState cPictureControl::ProcessKey(eKeys Key) eOSState cPictureControl::ProcessKey(eKeys Key)
{ {
switch (Key) { switch (int(Key)) {
case kUp: case kUp:
case kPlay: slideShowDelay.Set(); case kPlay: slideShowDelay.Set();
slideShow = true; slideShow = true;

6
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.c 3.10 2014/01/24 11:53:53 kls Exp $ * $Id: ci.c 3.11 2014/02/08 12:25:55 kls Exp $
*/ */
#include "ci.h" #include "ci.h"
@ -864,7 +864,7 @@ void cCiDateTime::SendDateTime(void)
#pragma pack(1) #pragma pack(1)
struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; }; struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; };
#pragma pack() #pragma pack()
tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) }; tTime T = { .mjd = htons(MJD), .h = DEC2BCD(tm_gmt.tm_hour), .m = DEC2BCD(tm_gmt.tm_min), .s = DEC2BCD(tm_gmt.tm_sec), .offset = short(htons(tm_loc.tm_gmtoff / 60)) };
bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer; bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer;
DumpTPDUDataTransfer &= DumpDateTime; DumpTPDUDataTransfer &= DumpDateTime;
if (DumpDateTime) if (DumpDateTime)
@ -1004,7 +1004,7 @@ void cCiMMI::Process(int Length, const uint8_t *Data)
case DCC_SET_MMI_MODE: case DCC_SET_MMI_MODE:
if (l == 2 && *++d == MM_HIGH_LEVEL) { if (l == 2 && *++d == MM_HIGH_LEVEL) {
struct tDisplayReply { uint8_t id; uint8_t mode; }; struct tDisplayReply { uint8_t id; uint8_t mode; };
tDisplayReply dr = { id : DRI_MMI_MODE_ACK, mode : MM_HIGH_LEVEL }; tDisplayReply dr = { .id = DRI_MMI_MODE_ACK, .mode = MM_HIGH_LEVEL };
dbgprotocol("Slot %d: ==> Display Reply (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId()); dbgprotocol("Slot %d: ==> Display Reply (%d)\n", Tc()->CamSlot()->SlotNumber(), SessionId());
SendData(AOT_DISPLAY_REPLY, 2, (uint8_t *)&dr); SendData(AOT_DISPLAY_REPLY, 2, (uint8_t *)&dr);
} }

View File

@ -8,7 +8,7 @@
* *
* parts of this file are derived from the OMS program. * parts of this file are derived from the OMS program.
* *
* $Id: dvbspu.h 2.6 2013/01/20 10:15:47 kls Exp $ * $Id: dvbspu.h 3.1 2014/02/08 12:27:34 kls Exp $
*/ */
#ifndef __DVBSPU_H #ifndef __DVBSPU_H
@ -101,7 +101,6 @@ class cDvbSpuDecoder:public cSpuDecoder {
uint8_t *spu; uint8_t *spu;
uint32_t spupts; uint32_t spupts;
bool clean; bool clean;
bool ready;
bool restricted_osd; bool restricted_osd;
enum spFlag { spNONE, spHIDE, spSHOW, spMENU }; enum spFlag { spNONE, spHIDE, spSHOW, spMENU };

View File

@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de> * Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * With some input from the "subtitles plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
* *
* $Id: dvbsubtitle.c 3.4 2013/09/07 10:39:46 kls Exp $ * $Id: dvbsubtitle.c 3.5 2014/02/08 12:29:13 kls Exp $
*/ */
#include "dvbsubtitle.h" #include "dvbsubtitle.h"
@ -34,7 +34,6 @@ static bool DebugDisplay = DebugVerbose || DebugNormal;
static bool DebugPages = DebugVerbose || DebugNormal; static bool DebugPages = DebugVerbose || DebugNormal;
static bool DebugRegions = DebugVerbose || DebugNormal; static bool DebugRegions = DebugVerbose || DebugNormal;
static bool DebugObjects = DebugVerbose || DebugNormal; static bool DebugObjects = DebugVerbose || DebugNormal;
static bool DebugBitmaps = DebugVerbose || DebugNormal;
static bool DebugConverter = DebugVerbose; static bool DebugConverter = DebugVerbose;
static bool DebugSegments = DebugVerbose; static bool DebugSegments = DebugVerbose;
static bool DebugPixel = DebugVerbose; static bool DebugPixel = DebugVerbose;
@ -45,7 +44,6 @@ static bool DebugOutput = DebugVerbose;
#define dbgpages(a...) if (DebugPages) SD.WriteHtml(a) #define dbgpages(a...) if (DebugPages) SD.WriteHtml(a)
#define dbgregions(a...) if (DebugRegions) SD.WriteHtml(a) #define dbgregions(a...) if (DebugRegions) SD.WriteHtml(a)
#define dbgobjects(a...) if (DebugObjects) SD.WriteHtml(a) #define dbgobjects(a...) if (DebugObjects) SD.WriteHtml(a)
#define dbgbitmaps(a...) if (DebugBitmaps) SD.WriteHtml(a)
#define dbgconverter(a...) if (DebugConverter) SD.WriteHtml(a) #define dbgconverter(a...) if (DebugConverter) SD.WriteHtml(a)
#define dbgsegments(a...) if (DebugSegments) SD.WriteHtml(a) #define dbgsegments(a...) if (DebugSegments) SD.WriteHtml(a)
#define dbgpixel(a...) if (DebugPixel) SD.WriteHtml(a) #define dbgpixel(a...) if (DebugPixel) SD.WriteHtml(a)

4
eit.c
View File

@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
* *
* $Id: eit.c 3.3 2013/11/03 13:55:00 kls Exp $ * $Id: eit.c 3.4 2014/02/08 12:33:01 kls Exp $
*/ */
#include "eit.h" #include "eit.h"
@ -220,7 +220,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
case SI::LinkageDescriptorTag: { case SI::LinkageDescriptorTag: {
SI::LinkageDescriptor *ld = (SI::LinkageDescriptor *)d; SI::LinkageDescriptor *ld = (SI::LinkageDescriptor *)d;
tChannelID linkID(Source, ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); tChannelID linkID(Source, ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId());
if (ld->getLinkageType() == 0xB0) { // Premiere World if (uint(ld->getLinkageType()) == 0xB0) { // Premiere World
bool hit = StartTime <= Now && Now < StartTime + Duration; bool hit = StartTime <= Now && Now < StartTime + Duration;
if (hit) { if (hit) {
char linkName[ld->privateData.getLength() + 1]; char linkName[ld->privateData.getLength() + 1];

View File

@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
* $Id: descriptor.h 3.1 2013/10/30 10:16:18 kls Exp $ * $Id: descriptor.h 3.2 2014/02/08 12:44:17 kls Exp $
* * * *
***************************************************************************/ ***************************************************************************/
@ -489,8 +489,6 @@ public:
StructureLoop<Language> languageLoop; StructureLoop<Language> languageLoop;
protected: protected:
virtual void Parse(); virtual void Parse();
private:
const descr_iso_639_language *s;
}; };
class PDCDescriptor : public Descriptor { class PDCDescriptor : public Descriptor {

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 3.18 2014/01/30 09:04:06 kls Exp $ * $Id: menu.c 3.19 2014/02/08 12:36:12 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -983,7 +983,7 @@ eOSState cMenuEditTimer::ProcessKey(eKeys Key)
if (!*data.file) if (!*data.file)
strcpy(data.file, data.Channel()->ShortName(true)); strcpy(data.file, data.Channel()->ShortName(true));
if (timer) { if (timer) {
if (memcmp(timer, &data, sizeof(data)) != 0) if (memcmp((void *)timer, &data, sizeof(data)) != 0)
*timer = data; *timer = data;
if (addIfConfirmed) if (addIfConfirmed)
Timers.Add(timer); Timers.Add(timer);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.h 3.2 2014/01/28 11:06:37 kls Exp $ * $Id: remux.h 3.3 2014/02/08 12:41:50 kls Exp $
*/ */
#ifndef __REMUX_H #ifndef __REMUX_H
@ -483,7 +483,6 @@ private:
bool independentFrame; bool independentFrame;
uint32_t ptsValues[MaxPtsValues]; // 32 bit is enough - we only need the delta uint32_t ptsValues[MaxPtsValues]; // 32 bit is enough - we only need the delta
int numPtsValues; int numPtsValues;
int numFrames;
int numIFrames; int numIFrames;
bool isVideo; bool isVideo;
double framesPerSecond; double framesPerSecond;