[SCM] audacity/master: Fix char to const char conversion in src/TrackArtist.cpp.

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Wed Feb 16 00:20:17 UTC 2011


The following commit has been merged in the master branch:
commit 9c35b5abc66c60415b23fc8c41c822e87dc5fd00
Author: Benjamin Drung <bdrung at gmail.com>
Date:   Wed Feb 16 01:19:40 2011 +0100

    Fix char to const char conversion in src/TrackArtist.cpp.

diff --git a/debian/patches/fix-const-char-conversion.patch b/debian/patches/fix-const-char-conversion.patch
new file mode 100644
index 0000000..5d1b3ba
--- /dev/null
+++ b/debian/patches/fix-const-char-conversion.patch
@@ -0,0 +1,60 @@
+Description: Fix char to const char conversion in src/TrackArtist.cpp.
+Author: Benjamin Drung <bdrung at debian.org>
+Forwarded: not-needed
+Applied-Upstream: 1.3.13
+
+--- a/src/TrackArtist.cpp
++++ b/src/TrackArtist.cpp
+@@ -2014,19 +2014,19 @@
+ */
+ 
+ /* Declare Static functions */
+-static char *IsShape(Alg_note_ptr note);
++static const char *IsShape(Alg_note_ptr note);
+ static double LookupRealAttribute(Alg_note_ptr note, Alg_attribute attr, double def);
+ static long LookupIntAttribute(Alg_note_ptr note, Alg_attribute attr, long def);
+ static bool LookupLogicalAttribute(Alg_note_ptr note, Alg_attribute attr, bool def);
+ static const char *LookupStringAttribute(Alg_note_ptr note, Alg_attribute attr, const char *def);
+-static char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def);
++static const char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def);
+ static int PITCH_TO_Y(double p, int bottom);
+-static char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def);
++static const char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def);
+ static int PITCH_TO_Y(double p, int bottom);
+ 
+ // returns NULL if note is not a shape,
+ // returns atom (string) value of note if note is a shape
+-char *IsShape(Alg_note_ptr note)
++const char *IsShape(Alg_note_ptr note)
+ {
+   Alg_parameters_ptr parameters = note->parameters;
+   while (parameters) {
+@@ -2095,7 +2095,7 @@
+ }
+ 
+ // returns value of attr, or default if not found
+-char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def)
++const char *LookupAtomAttribute(Alg_note_ptr note, Alg_attribute attr, char *def)
+ {
+   Alg_parameters_ptr parameters = note->parameters;
+   while (parameters) {
+@@ -2311,7 +2311,7 @@
+             double x = note->time;
+             double x1 = note->time + note->dur;
+             if (x < h1 && x1 > h) { // omit if outside box
+-               char *shape = NULL;
++               const char *shape = NULL;
+                if (note->loud > 0.0 || !(shape = IsShape(note))) {
+ 
+                   int octave = (((int) (note->pitch + 0.5)) / 12);
+@@ -2474,8 +2474,8 @@
+                      //// if no color specified, copy color from brush
+                      //else dc.SetTextBackground(dc.GetPen().GetColour());
+ 
+-                     char *font = LookupAtomAttribute(note, fonta, NULL);
+-                     char *weight = LookupAtomAttribute(note, weighta, NULL);
++                     const char *font = LookupAtomAttribute(note, fonta, NULL);
++                     const char *weight = LookupAtomAttribute(note, weighta, NULL);
+                      int size = LookupIntAttribute(note, sizei, 8);
+                      const char *justify = LookupStringAttribute(note, justifys, "ld");
+                      wxFont wxfont;
diff --git a/debian/patches/series b/debian/patches/series
index 2641b32..ae7d5e4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ autoreconf.patch
 disable-dynamic-loading.patch
 portsmf-configure.patch
 configure.patch
+fix-const-char-conversion.patch

-- 
Audacity debian packaging



More information about the pkg-multimedia-commits mailing list