summaryrefslogtreecommitdiff
path: root/command
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-05-25 15:10:21 +0200
committerJochen Dolze <vdr@dolze.de>2010-05-25 15:10:21 +0200
commitb7c606a20063d600708e82ee9ad65d128dab77aa (patch)
treef4ff2c69db787048872131120290a35d42773b68 /command
parent6ac4484e8b861dd781d6d5b573b315d54fa7b322 (diff)
downloadvdr-plugin-markad-b7c606a20063d600708e82ee9ad65d128dab77aa.tar.gz
vdr-plugin-markad-b7c606a20063d600708e82ee9ad65d128dab77aa.tar.bz2
Fixed some compiler warnings
Diffstat (limited to 'command')
-rw-r--r--command/decoder.h3
-rw-r--r--command/markad-standalone.cpp17
-rw-r--r--command/marks.cpp2
-rw-r--r--command/video.cpp6
4 files changed, 16 insertions, 12 deletions
diff --git a/command/decoder.h b/command/decoder.h
index 46e9f74..8f05108 100644
--- a/command/decoder.h
+++ b/command/decoder.h
@@ -12,6 +12,9 @@
#include <stdint.h>
#include <sched.h>
+#include <sys/types.h>
+#include <string.h>
+#include <cstdlib>
#ifndef DECLARE_ALIGNED
#define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index c11f880..72fe12a 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -102,9 +102,10 @@ void *cOSDMessage::send(void *posd)
return NULL;
}
- write(sock,"MESG ",5);
- write(sock,osd->msg,strlen(osd->msg));
- write(sock,"\r\n",2);
+ ssize_t ret;
+ ret=write(sock,"MESG ",5);
+ ret=write(sock,osd->msg,strlen(osd->msg));
+ ret=write(sock,"\r\n",2);
if (!osd->readreply(sock))
{
@@ -112,7 +113,7 @@ void *cOSDMessage::send(void *posd)
return NULL;
}
- write(sock,"QUIT\r\n",6);
+ ret=write(sock,"QUIT\r\n",6);
osd->readreply(sock);
close(sock);
@@ -470,8 +471,8 @@ void cMarkAdStandalone::SaveFrame(int frame)
macontext.Video.Info.Height);
// Write pixel data
- fwrite(macontext.Video.Data.Plane[0],1,
- macontext.Video.Data.PlaneLinesize[0]*macontext.Video.Info.Height,pFile);
+ if (fwrite(macontext.Video.Data.Plane[0],1,
+ macontext.Video.Data.PlaneLinesize[0]*macontext.Video.Info.Height,pFile)) {};
// Close file
fclose(pFile);
}
@@ -1227,7 +1228,7 @@ bool cMarkAdStandalone::RegenerateVDRIndex(const char *Directory)
struct stat statbuf;
if (!stat(spath,&statbuf))
{
- chown(newpath,statbuf.st_uid, statbuf.st_gid);
+ if (chown(newpath,statbuf.st_uid, statbuf.st_gid)) {};
}
free(spath);
}
@@ -1288,7 +1289,7 @@ bool cMarkAdStandalone::CreatePidfile(const char *Directory)
struct stat statbuf;
if (!stat(Directory,&statbuf))
{
- chown(buf,statbuf.st_uid, statbuf.st_gid);
+ if (chown(buf,statbuf.st_uid, statbuf.st_gid)) {};
}
}
diff --git a/command/marks.cpp b/command/marks.cpp
index 6935175..67358fc 100644
--- a/command/marks.cpp
+++ b/command/marks.cpp
@@ -392,7 +392,7 @@ bool clMarks::Save(const char *Directory, double FrameRate, bool isTS)
struct stat statbuf;
if (!stat(spath,&statbuf))
{
- chown(fpath,statbuf.st_uid, statbuf.st_gid);
+ if (chown(fpath,statbuf.st_uid, statbuf.st_gid)) {};
}
free(spath);
}
diff --git a/command/video.cpp b/command/video.cpp
index 2f75222..92c834d 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -66,7 +66,7 @@ int cMarkAdLogo::Load(char *directory, char *file)
free(path);
if (!pFile) return -1;
- fscanf(pFile, "P5\n#C%i %i\n%d %d\n255\n#", &area.corner,&area.mpixel,&LOGOWIDTH,&LOGOHEIGHT);
+ if (fscanf(pFile, "P5\n#C%i %i\n%d %d\n255\n#", &area.corner,&area.mpixel,&LOGOWIDTH,&LOGOHEIGHT)) {};
if (LOGOHEIGHT==255)
{
@@ -82,7 +82,7 @@ int cMarkAdLogo::Load(char *directory, char *file)
return -2;
}
- fread(&area.mask,1,LOGOWIDTH*LOGOHEIGHT,pFile);
+ if (fread(&area.mask,1,LOGOWIDTH*LOGOHEIGHT,pFile)!=(size_t) (LOGOWIDTH*LOGOHEIGHT)) return -2;
if (!area.mpixel)
{
@@ -121,7 +121,7 @@ void cMarkAdLogo::Save(int lastiframe, uchar *picture)
fprintf(pFile, "P5\n#C%i\n%d %d\n255\n", area.corner, LOGOWIDTH,LOGOHEIGHT);
// Write pixel data
- fwrite(picture,1,LOGOWIDTH*LOGOHEIGHT,pFile);
+ if (fwrite(picture,1,LOGOWIDTH*LOGOHEIGHT,pFile)) {};
// Close file
fclose(pFile);
free(buf);