summaryrefslogtreecommitdiff
blob: aca7591c3959182e8fecb712f9b51b541914d03d (plain)
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 -Naur cdda-0.1.0.orig/cdda_cddb.c cdda-0.1.0/cdda_cddb.c
--- cdda-0.1.0.orig/cdda_cddb.c	2009-12-27 17:18:37.000000000 +0100
+++ cdda-0.1.0/cdda_cddb.c	2009-12-27 17:28:09.000000000 +0100
@@ -58,14 +58,14 @@
 
     sscanf(key, "%a[^\n0-9]%d", &p_key, &track);
 
-    char *p_value1 = NULL, *p_value2 = NULL, *p_idx = index(value, '/');
+    const char *p_value1 = NULL, *p_value2 = NULL, *p_idx = index(value, '/');
     if (NULL != p_idx && 0x20 == *(p_idx-1) && 0x20 == *(p_idx+1) && 0x00 != *(p_idx+2))
       sscanf(value, "%a[^/] / %a[^/]", &p_value1, &p_value2);
     else
       sscanf(value, "%a[^/]", &p_value1);
 
-    FixString(p_value1);
-    FixString(p_value2);
+    FixString((char *)p_value1);
+    FixString((char *)p_value2);
 #ifdef DEBUG
     printf("S key=<%s> track=%d value1=<%s> value2=<%s>\n", p_key, track, p_value1, p_value2);
 #endif
@@ -74,19 +74,19 @@
       char *p_str = NULL;
       if (0 == strncmp("DISCID", p_key, 6)) {
         p_str = ConCatString(tag[0]->GetDiscId(), p_value1);
-        free(p_value1);
+        free((char *)p_value1);
         p_value1 = p_str;
         tag[0]->SetDiscId(p_value1);
         tag[0]->SetGenre(genre);
       } else if (0 == strncmp("DTITLE", p_key, 6)) {
         if (NULL != p_value1 && NULL != p_value2) {
           p_str = ConCatString(tag[0]->GetPerformer(), p_value1);
-          free(p_value1);
+          free((char *)p_value1);
           p_value1 = p_str;
           tag[0]->SetPerformer(p_value1);
 
           p_str = ConCatString(tag[0]->GetTitle(), p_value2);
-          free(p_value2);
+          free((char *)p_value2);
           p_value2 = p_str;
           tag[0]->SetTitle(p_value2);
         } else if (NULL != p_value1 && NULL == p_value2) {
@@ -94,7 +94,7 @@
             tag[0]->SetPerformer(p_value1);
           else {
             p_str = ConCatString(tag[0]->GetTitle(), p_value1);
-            free(p_value1);
+            free((char *)p_value1);
             p_value1 = p_str;
             tag[0]->SetTitle(p_value1);
           }
@@ -108,17 +108,17 @@
           tag[track+1]->SetPerformer(tag[0]->GetPerformer());
 
           p_str = ConCatString(tag[track+1]->GetTitle(), p_value1);
-          free(p_value1);
+          free((char *)p_value1);
           p_value1 = p_str;
           tag[track+1]->SetTitle(p_value1);
         } else {
           p_str = ConCatString(tag[track+1]->GetPerformer(), p_value1);
-          free(p_value1);
+          free((char *)p_value1);
           p_value1 = p_str;
           tag[track+1]->SetPerformer(p_value1);
 
           p_str = ConCatString(tag[track+1]->GetTitle(), p_value2);
-          free(p_value2);
+          free((char *)p_value2);
           p_value2 = p_str;
           tag[track+1]->SetTitle(p_value2);
         }
@@ -137,8 +137,8 @@
       }
     }
     free(p_key);
-    free(p_value1);
-    free(p_value2);
+    free((char *)p_value1);
+    free((char *)p_value2);
   }
 }