diff options
-rw-r--r-- | CONTRIBUTORS | 3 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | channels.c | 11 | ||||
-rw-r--r-- | dvbdevice.c | 4 | ||||
-rw-r--r-- | font.h | 3 | ||||
-rw-r--r-- | svdrp.c | 5 |
6 files changed, 19 insertions, 9 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 08f6ccfc..5193476e 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1299,3 +1299,6 @@ Mikko Salo <mikko.salo@ppe.inet.fi> Roman Krenický <free-rtk@gmx.de> for a patch that was used a a basis for changing a timer's day handling to full date + +Ville Skyttä <ville.skytta@iki.fi> + for reporting several compiler warnings in gcc 4.0 @@ -3464,3 +3464,5 @@ Video Disk Recorder Revision History - The day of a timer is now stored as a full date in ISO notation ("YYYY-MM-DD") in 'timers.conf' and for the result of the SVDRP command LSTT (based in parts on a patch by Roman Krenický). +- Some fixes to avoid compiler warnings in gcc 4.0 (thanks to Ville Skyttä for reporting + these). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.35 2005/02/06 09:44:53 kls Exp $ + * $Id: channels.c 1.36 2005/03/19 15:56:38 kls Exp $ */ #include "channels.h" @@ -694,9 +694,12 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID) char *p = strchr(vpidbuf, '+'); if (p) *p++ = 0; - sscanf(vpidbuf, "%d", &vpid); - if (p) - sscanf(p, "%d", &ppid); + if (sscanf(vpidbuf, "%d", &vpid) != 1) + return false; + if (p) { + if (sscanf(p, "%d", &ppid) != 1) + return false; + } else ppid = vpid; diff --git a/dvbdevice.c b/dvbdevice.c index ce23f76d..9c8a0ac4 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.126 2005/03/13 12:34:00 kls Exp $ + * $Id: dvbdevice.c 1.127 2005/03/20 10:10:38 kls Exp $ */ #include "dvbdevice.h" @@ -577,7 +577,7 @@ bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int Siz else { // write PNM file: if (fprintf(f, "P6\n%d\n%d\n255\n", vm.width, vm.height) < 0 || - fwrite(mem, vm.width * vm.height * 3, 1, f) < 0) { + fwrite(mem, vm.width * vm.height * 3, 1, f) != 1) { LOG_ERROR_STR(FileName); result |= 1; } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: font.h 1.10 2005/01/14 13:25:35 kls Exp $ + * $Id: font.h 1.11 2005/03/19 15:51:19 kls Exp $ */ #ifndef __FONT_H @@ -44,6 +44,7 @@ private: int height; public: cFont(void *Data); + virtual ~cFont() {} void SetData(void *Data); virtual int Width(unsigned char c) const { return data[c]->width; } ///< Returns the width of the given character. @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 1.67 2004/12/26 12:23:55 kls Exp $ + * $Id: svdrp.c 1.68 2005/03/19 16:05:33 kls Exp $ */ #include "svdrp.h" @@ -111,7 +111,8 @@ int cSocket::Accept(void) bool accepted = SVDRPhosts.Acceptable(clientname.sin_addr.s_addr); if (!accepted) { const char *s = "Access denied!\n"; - write(newsock, s, strlen(s)); + if (write(newsock, s, strlen(s)) < 0) + LOG_ERROR; close(newsock); newsock = -1; } |