1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added some missing 'const' keywords to avoid compilation errors with gcc 4.4 (backport from version 1.7.8)

This commit is contained in:
Klaus Schmidinger 2012-02-14 13:53:38 +01:00
parent 17485ccc96
commit 6715f40484
4 changed files with 13 additions and 8 deletions

View File

@ -2367,3 +2367,5 @@ Winfried K
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

View File

@ -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).

View File

@ -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;

View File

@ -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;