mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Some fixes to avoid compiler warnings in gcc 4.0
This commit is contained in:
parent
86a9d179bd
commit
e760b14f64
@ -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
|
||||
|
2
HISTORY
2
HISTORY
@ -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).
|
||||
|
11
channels.c
11
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 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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
3
font.h
3
font.h
@ -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.
|
||||
|
5
svdrp.c
5
svdrp.c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user