summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-14 13:53:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-14 13:53:38 +0100
commit6715f4048407bb4db430f3181d29ee71a9069653 (patch)
tree1e8cbaa65e56969b62e29340d8b844987737090a
parent17485ccc96a2c562ba947070acc0a77be2b7db9c (diff)
downloadvdr-6715f4048407bb4db430f3181d29ee71a9069653.tar.gz
vdr-6715f4048407bb4db430f3181d29ee71a9069653.tar.bz2
Added some missing 'const' keywords to avoid compilation errors with gcc 4.4 (backport from version 1.7.8)
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--recording.c8
-rw-r--r--svdrp.c9
4 files changed, 13 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index ab8d1199..043c6653 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2367,3 +2367,5 @@ Winfried Köhler <w_koehl@gmx.de>
Ralf Schueler <dl4mw@schueler.ws>
for backporting "Changed cDvbDevice::GrabImage() to use V4L" from version 1.7.3
to 1.6.0-3
+ for backporting "Added some missing 'const' keywords to avoid compilation errors
+ with gcc 4.4" from version 1.7.8 to 1.6.0-3
diff --git a/HISTORY b/HISTORY
index b31cceb1..78050083 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5763,3 +5763,5 @@ Video Disk Recorder Revision History
- Changed cDvbDevice::GrabImage() to use V4L2
(backport from version 1.7.3, thanks to Ralf Schueler).
+- Added some missing 'const' keywords to avoid compilation errors with gcc 4.4
+ (backport from version 1.7.8, thanks to Ralf Schueler).
diff --git a/recording.c b/recording.c
index 1535b46b..e74fc839 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.162 2008/02/24 10:28:53 kls Exp $
+ * $Id: recording.c 1.162.1.1 2012/02/14 13:47:29 kls Exp $
*/
#include "recording.h"
@@ -509,8 +509,8 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH);
Subtitle = SubtitleBuffer;
}
- char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
- char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
+ const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
+ const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
if (macroTITLE || macroEPISODE) {
name = strdup(Timer->File());
name = strreplace(name, TIMERMACRO_TITLE, Title);
@@ -551,7 +551,7 @@ cRecording::cRecording(const char *FileName)
sortBuffer = NULL;
fileName = strdup(FileName);
FileName += strlen(VideoDirectory) + 1;
- char *p = strrchr(FileName, '/');
+ const char *p = strrchr(FileName, '/');
name = NULL;
info = new cRecordingInfo;
diff --git a/svdrp.c b/svdrp.c
index 6232915f..7607965a 100644
--- a/svdrp.c
+++ b/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.109.1.1 2008/05/02 14:29:16 kls Exp $
+ * $Id: svdrp.c 1.109.1.2 2012/02/14 13:52:35 kls Exp $
*/
#include "svdrp.h"
@@ -736,7 +736,7 @@ void cSVDRP::CmdGRAB(const char *Option)
char *strtok_next;
FileName = strtok_r(p, delim, &strtok_next);
// image type:
- char *Extension = strrchr(FileName, '.');
+ const char *Extension = strrchr(FileName, '.');
if (Extension) {
if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0)
Jpeg = true;
@@ -795,8 +795,9 @@ void cSVDRP::CmdGRAB(const char *Option)
char RealFileName[PATH_MAX];
if (FileName) {
if (grabImageDir) {
- cString s;
- char *slash = strrchr(FileName, '/');
+ cString s(FileName);
+ FileName = s;
+ const char *slash = strrchr(FileName, '/');
if (!slash) {
s = AddDirectory(grabImageDir, FileName);
FileName = s;