1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
diff -ru vdr-1.6.0-orig/channels.c vdr-1.6.0/channels.c
--- vdr-1.6.0-orig/channels.c 2009-06-04 10:34:56.144472994 +0200
+++ vdr-1.6.0/channels.c 2009-06-04 10:34:33.341139740 +0200
@@ -574,7 +574,7 @@
}
else
q += sprintf(q, " none");
- dsyslog(buffer);
+ dsyslog("%s", buffer);
}
void cChannel::SetRefChannel(cChannel *RefChannel)
diff -ru vdr-1.6.0-orig/receiver.c vdr-1.6.0/receiver.c
--- vdr-1.6.0-orig/receiver.c 2009-06-04 10:34:46.547807527 +0200
+++ vdr-1.6.0/receiver.c 2009-06-04 10:35:26.074465985 +0200
@@ -40,7 +40,7 @@
{
if (device) {
const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will segfault now!";
- esyslog(msg);
+ esyslog("%s", msg);
fprintf(stderr, "%s\n", msg);
*(char *)0 = 0; // cause a segfault
}
diff -ru vdr-1.6.0-orig/recording.c vdr-1.6.0/recording.c
--- vdr-1.6.0-orig/recording.c 2009-06-04 10:34:56.141139523 +0200
+++ vdr-1.6.0/recording.c 2009-06-04 10:34:33.337807723 +0200
@@ -509,8 +509,8 @@
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 @@
sortBuffer = NULL;
fileName = strdup(FileName);
FileName += strlen(VideoDirectory) + 1;
- char *p = strrchr(FileName, '/');
+ const char *p = strrchr(FileName, '/');
name = NULL;
info = new cRecordingInfo;
@@ -1022,7 +1022,8 @@
if (recording) {
cThreadLock DeletedRecordingsLock(&DeletedRecordings);
Del(recording, false);
- char *ext = strrchr(recording->FileName(), '.');
+ // wtf?
+ char *ext = strrchr(const_cast<char*>(recording->FileName()), '.');
if (ext) {
strncpy(ext, DELEXT, strlen(ext));
recording->fileSizeMB = DirSizeMB(recording->FileName());
diff -ru vdr-1.6.0-orig/svdrp.c vdr-1.6.0/svdrp.c
--- vdr-1.6.0-orig/svdrp.c 2009-06-04 10:34:56.141139523 +0200
+++ vdr-1.6.0/svdrp.c 2009-06-04 10:34:33.337807723 +0200
@@ -736,7 +736,7 @@
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;
@@ -796,12 +796,12 @@
if (FileName) {
if (grabImageDir) {
cString s;
- char *slash = strrchr(FileName, '/');
+ char *slash = strrchr(const_cast<char*>(FileName), '/');
if (!slash) {
s = AddDirectory(grabImageDir, FileName);
FileName = s;
}
- slash = strrchr(FileName, '/'); // there definitely is one
+ slash = strrchr(const_cast<char*>(FileName), '/'); // there definitely is one
*slash = 0;
char *r = realpath(FileName, RealFileName);
*slash = '/';
|