diff mbox

[PATCHv3] package/sdl_sound: fix constness in debug mode

Message ID 1416257165-19798-1-git-send-email-yann.morin.1998@free.fr
State Accepted
Commit 2b0c806d09d593709f8d7189c8a00b95cc76326e
Headers show

Commit Message

Yann E. MORIN Nov. 17, 2014, 8:46 p.m. UTC
When in debug mode, ./configure forces -Werror, which uncovers a
constness issue in the speex decoder.

Add a patch to fix this.

Fixes:
    http://autobuild.buildroot.net/results/6f5/6f5e1b782923d6e69e929466f0ddd3eeba28c6f1/
    http://autobuild.buildroot.net/results/c1b/c1b31dc37fe62cb6901edad02bf50d73072b7cf0/
    http://autobuild.buildroot.net/results/162/162e6d77e5812060001ea22faff99055aae3122a/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

---
Changes v2 -> v3:
  - do not autoreconf  (Bernd)

Changes v1 -> v2:
  - fix the code rather than hiding the bug  (Peter, Bernd, Vicente)
---
 package/sdl_sound/0001-fix-constness.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/sdl_sound/0001-fix-constness.patch

Comments

Peter Korsgaard Nov. 18, 2014, 7:42 a.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > When in debug mode, ./configure forces -Werror, which uncovers a
 > constness issue in the speex decoder.

 > Add a patch to fix this.

 > Fixes:
 >     http://autobuild.buildroot.net/results/6f5/6f5e1b782923d6e69e929466f0ddd3eeba28c6f1/
 >     http://autobuild.buildroot.net/results/c1b/c1b31dc37fe62cb6901edad02bf50d73072b7cf0/
 >     http://autobuild.buildroot.net/results/162/162e6d77e5812060001ea22faff99055aae3122a/
 >     ...

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
 > Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

 > ---
 > Changes v2 -> v3:
 >   - do not autoreconf  (Bernd)

 > Changes v1 -> v2:
 >   - fix the code rather than hiding the bug  (Peter, Bernd, Vicente)

Committed, thanks.
diff mbox

Patch

diff --git a/package/sdl_sound/0001-fix-constness.patch b/package/sdl_sound/0001-fix-constness.patch
new file mode 100644
index 0000000..1f27a07
--- /dev/null
+++ b/package/sdl_sound/0001-fix-constness.patch
@@ -0,0 +1,16 @@ 
+decoders/speex: fix constness of speex mode
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+diff -durN sdl_sound-1.0.3.orig/decoders/speex.c sdl_sound-1.0.3/decoders/speex.c
+--- sdl_sound-1.0.3.orig/decoders/speex.c	2014-11-17 19:40:09.543553556 +0100
++++ sdl_sound-1.0.3/decoders/speex.c	2014-11-17 19:40:37.119864580 +0100
+@@ -124,7 +124,7 @@
+ 
+ static int process_header(speex_t *speex, Sound_Sample *sample)
+ {
+-    SpeexMode *mode;
++    const SpeexMode * mode;
+     SpeexHeader *hptr;
+     SpeexHeader header;
+     int enh_enabled = SPEEX_USE_PERCEPTUAL_ENHANCER;