Skip to contentSkip to conversation

package/sdl_sound: Fix build with BR2_ENABLE_DEBUG=yes

PATCH Superseded Bernd Kuhls 3 participants 3 messages Oct 20, 2014 – Nov 3, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/sdl_sound: Fix build with BR2_ENABLE_DEBUG=yes

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

---
 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
package/sdl_sound/sdl_sound-0001-debug.patch new file +21 -0
new file mode 100644
index 0000000..023e9b4
@@ -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 <[email protected]>
+
+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
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 package/sdl_sound: Fix build with BR2_ENABLE_DEBUG=yes

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> 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

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.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 package/sdl_sound: Fix build with BR2_ENABLE_DEBUG=yes

Dear Peter Korsgaard and Bernd Kuhls,

Quoted 9 lines · Peter Korsgaard
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> 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

Quoted 6 lines
Quoted 1 line

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,

Signature · 5 lines
Vicente Olivert Riera
Graduate Software Engineer, MIPS Processor IP
Imagination Technologies Limited
t: +44 (0)113 2429814
www.imgtec.com