From 68d59e292124abc89432e8403c4c2b7441c55f7c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 1 Jan 2010 15:44:52 +0100 Subject: Fixed compiler warnings "format not a string literal and no format arguments" in some syslog calls --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ channels.c | 4 ++-- device.c | 4 ++-- pat.c | 4 ++-- receiver.c | 4 ++-- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4d6bcd4d..8844db86 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1083,6 +1083,8 @@ Rolf Ahrenberg 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 for reporting a bug in cutting a recording if there is only a single editing mark diff --git a/HISTORY b/HISTORY index a1f647da..f83de336 100644 --- a/HISTORY +++ b/HISTORY @@ -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). diff --git a/channels.c b/channels.c index 2c72e002..0a9b4a2e 100644 --- a/channels.c +++ b/channels.c @@ -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) diff --git a/device.c b/device.c index 481d2328..3228af20 100644 --- a/device.c +++ b/device.c @@ -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 diff --git a/pat.c b/pat.c index 4aa12ddb..9b3ded61 100644 --- a/pat.c +++ b/pat.c @@ -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 } diff --git a/receiver.c b/receiver.c index 4f537e23..08346e4f 100644 --- a/receiver.c +++ b/receiver.c @@ -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 } -- cgit v1.2.3