diff mbox

[1/1] package/sdl_sound: Fix build with BR2_ENABLE_DEBUG=yes

Message ID 1413781229-23932-1-git-send-email-bernd.kuhls@t-online.de
State Superseded
Headers show

Commit Message

Bernd Kuhls Oct. 20, 2014, 5 a.m. UTC
Fixes
speex.c: In function 'process_header':
speex.c:140:10: error: assignment discards 'const' qualifier from pointer target type [-Werror]
     mode = speex_mode_list[header.mode];
          ^
cc1: all warnings being treated as errors

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/sdl_sound/sdl_sound-0001-debug.patch |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/sdl_sound/sdl_sound-0001-debug.patch

Comments

Peter Korsgaard Oct. 20, 2014, 6:49 a.m. UTC | #1
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

 > Fixes
 > speex.c: In function 'process_header':
 > speex.c:140:10: error: assignment discards 'const' qualifier from pointer target type [-Werror]
 >      mode = speex_mode_list[header.mode];
 >           ^
 > cc1: all warnings being treated as errors

 > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Thanks, but it would be nice to use something upstreamable
instead. Either fix the constness (speex_mode_list has afaik returned a
const for a very long time) or discuss with upstream about disabling
-Werror in configure.in.
Vicente Olivert Riera Nov. 3, 2014, 3:14 p.m. UTC | #2
Dear Peter Korsgaard and Bernd Kuhls,

On 10/20/2014 07:49 AM, Peter Korsgaard wrote:
>>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:
> 
>  > Fixes
>  > speex.c: In function 'process_header':
>  > speex.c:140:10: error: assignment discards 'const' qualifier from pointer target type [-Werror]
>  >      mode = speex_mode_list[header.mode];
>  >           ^
>  > cc1: all warnings being treated as errors
> 
>  > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> 
> Thanks, but it would be nice to use something upstreamable
> instead. Either fix the constness (speex_mode_list has afaik returned a
> const for a very long time) or discuss with upstream about disabling
> -Werror in configure.in.

Reported upstream:

http://lists.libsdl.org/pipermail/sdl-libsdl.org/2014-November/096804.html

Best regards,
diff mbox

Patch

diff --git a/package/sdl_sound/sdl_sound-0001-debug.patch b/package/sdl_sound/sdl_sound-0001-debug.patch
new file mode 100644
index 0000000..023e9b4
--- /dev/null
+++ b/package/sdl_sound/sdl_sound-0001-debug.patch
@@ -0,0 +1,21 @@ 
+Fix compile error when debug is enabled
+
+speex.c: In function 'process_header':
+speex.c:140:10: error: assignment discards 'const' qualifier from pointer target type [-Werror]
+     mode = speex_mode_list[header.mode];
+          ^
+cc1: all warnings being treated as errors
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr SDL_sound-1.0.3.org/configure SDL_sound-1.0.3/configure
+--- SDL_sound-1.0.3.org/configure	2008-04-20 22:33:52.000000000 +0200
++++ SDL_sound-1.0.3/configure	2014-10-20 06:57:27.887688027 +0200
+@@ -19561,7 +19561,6 @@
+   else
+     CFLAGS="-O0"
+   fi
+-  CFLAGS="$CFLAGS -Werror"
+ 
+ cat >>confdefs.h <<\_ACEOF
+ #define DEBUG 1