Fixed compiler warnings "format not a string literal and no format arguments" in some syslog calls

This commit is contained in:
Klaus Schmidinger 2010-01-01 15:44:52 +01:00
parent 491c6d0a85
commit 68d59e2921
6 changed files with 12 additions and 8 deletions

View File

@ -1083,6 +1083,8 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
contain UTF-8 characters
for fixing wrong bracketing in cChannel::SubtitlingType() etc.
for fixing handling DVB subtitles for PES recordings
for fixing compiler warnings "format not a string literal and no format arguments"
in some syslog calls
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark

View File

@ -6247,3 +6247,5 @@ Video Disk Recorder Revision History
IMPORTANT NOTE TO PLUGIN AUTHORS: a plugin that implements a derived cDevice
class that can replay video must now call the MakePrimaryDevice() function of
its base class.
- Fixed compiler warnings "format not a string literal and no format arguments"
in some syslog calls (thanks to Rolf Ahrenberg).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: channels.c 2.10 2009/12/23 15:56:03 kls Exp $
* $Id: channels.c 2.11 2010/01/01 15:38:18 kls Exp $
*/
#include "channels.h"
@ -626,7 +626,7 @@ void cChannel::SetLinkChannels(cLinkChannels *LinkChannels)
else
q += sprintf(q, " none");
if (Number())
dsyslog(buffer);
dsyslog("%s", buffer);
}
void cChannel::SetRefChannel(cChannel *RefChannel)

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 2.30 2010/01/01 15:03:36 kls Exp $
* $Id: device.c 2.31 2010/01/01 15:40:35 kls Exp $
*/
#include "device.h"
@ -405,7 +405,7 @@ void cDevice::GetOsdSize(int &Width, int &Height, double &PixelAspect)
PixelAspect = 1.0;
}
//#define PRINTPIDS(s) { char b[500]; char *q = b; q += sprintf(q, "%d %s ", CardIndex(), s); for (int i = 0; i < MAXPIDHANDLES; i++) q += sprintf(q, " %s%4d %d", i == ptOther ? "* " : "", pidHandles[i].pid, pidHandles[i].used); dsyslog(b); }
//#define PRINTPIDS(s) { char b[500]; char *q = b; q += sprintf(q, "%d %s ", CardIndex(), s); for (int i = 0; i < MAXPIDHANDLES; i++) q += sprintf(q, " %s%4d %d", i == ptOther ? "* " : "", pidHandles[i].pid, pidHandles[i].used); dsyslog("%s", b); }
#define PRINTPIDS(s)
bool cDevice::HasPid(int Pid) const

4
pat.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: pat.c 2.6 2009/12/24 13:01:18 kls Exp $
* $Id: pat.c 2.7 2010/01/01 15:40:05 kls Exp $
*/
#include "pat.h"
@ -144,7 +144,7 @@ void cCaDescriptors::AddCaDescriptor(SI::CaDescriptor *d, int EsPid)
q += sprintf(q, "CAM: %04X %5d %5d %04X %04X -", source, transponder, serviceId, d->getCaType(), EsPid);
for (int i = 0; i < nca->Length(); i++)
q += sprintf(q, " %02X", nca->Data()[i]);
dsyslog(buffer);
dsyslog("%s", buffer);
#endif
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: receiver.c 1.7 2007/08/12 12:30:00 kls Exp $
* $Id: receiver.c 2.1 2010/01/01 15:38:48 kls Exp $
*/
#include "receiver.h"
@ -40,7 +40,7 @@ cReceiver::~cReceiver()
{
if (device) {
const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will segfault now!";
esyslog(msg);
esyslog("%s", msg);
fprintf(stderr, "%s\n", msg);
*(char *)0 = 0; // cause a segfault
}