[SCM] bs1770gain/master: Tell compiler to ignore pointer alignment casting where they seem to be OK.
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Wed Jun 24 11:38:30 UTC 2015
The following commit has been merged in the master branch:
commit bfafcdfa1a37ab59cbfbf235f27354b66eb31a9c
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Wed Jun 24 11:30:02 2015 +0000
Tell compiler to ignore pointer alignment casting where they seem to be OK.
diff --git a/debian/patches/30-strict-cast-align.diff b/debian/patches/30-strict-cast-align.diff
index 367d4da..958f2c7 100644
--- a/debian/patches/30-strict-cast-align.diff
+++ b/debian/patches/30-strict-cast-align.diff
@@ -1,20 +1,29 @@
-Description: Enforce strict cast alignment check.
+Description: Enforce strict cast alignment check and fix build problems.
- Make sure the source fail to build on archs where casting break
- alignment rules.
+ When building with -Wstrict-align, the compiler warn about changing
+ the alignment of some pointers on some architectures like mips.
+ Because of this, upstream decided to remove -Wstrict-align from the
+ default build. I believe it should be kept, to discover new aligment
+ problems introduced into the code in the future.
- Upstream believe the compiler is confused and the pointers are
- properly aligned. This should be verified before the warning
- is hidden.
+ This patch reintroduces it and fixes the know issues reported by the
+ compiler today.
+
+ The AVFrame.data char pointer is storing data believed to be properly
+ aligned by the ffmpeg library, thus the warning can be ignored. The
+
+ The pull_cb_t and sox_reader_t pointers are believed to be OK, but
+ this has not been verified.
+
+ With the following patch, the code build on mips and the program is
+ able to transcode a 16 bit wav file.
Author: Petter Reinholdtsen <pere at hungry.com>
Forwarded: no
-Debian-Bug: https://bugs.debian.org/789250
+Bug-Debian: https://bugs.debian.org/789250
Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
Last-Update: 2015-06-24
-diff --git a/libffsox-2/Makefile.in b/libffsox-2/Makefile.in
-index 3d0f98a..4488291 100755
--- a/libffsox-2/Makefile.in
+++ b/libffsox-2/Makefile.in
@@ -115,7 +115,7 @@ BS1770GAIN_TOOLS_UNINSTALL = @BS1770GAIN_TOOLS_UNINSTALL@
@@ -26,3 +35,83 @@ index 3d0f98a..4488291 100755
-Wreturn-type -Wextra -Wstrict-prototypes
CPP = @CPP@
#CFLAGS+=-Wmissing-declarations
+--- bs1770gain-0.4.3.orig/libffsox-2/ffsox_frame_convert.c
++++ bs1770gain-0.4.3/libffsox-2/ffsox_frame_convert.c
+@@ -140,10 +140,10 @@ static int convert_##r##i##_##w##i(conve
+ R *rp; \
+ W *wp,*mp; \
+ \
+- rp=(R *)p->fr->frame->data[0]; \
++ rp=(R *)(void*)p->fr->frame->data[0]; \
+ rp+=channels*p->fr->nb_samples.frame; \
+ \
+- wp=(W *)p->fw->frame->data[0]; \
++ wp=(W *)(void*)p->fw->frame->data[0]; \
+ wp+=channels*p->fw->nb_samples.frame; \
+ mp=wp+channels*p->nb_samples; \
+ \
+@@ -281,11 +281,11 @@ static int convert_##r##p##_##w##i(conve
+ W *wp,*mp; \
+ \
+ for (ch=0;ch<channels;++ch) { \
+- rp[ch]=(R *)p->fr->frame->data[ch]; \
++ rp[ch]=(R *)(void*)p->fr->frame->data[ch]; \
+ rp[ch]+=p->fr->nb_samples.frame; \
+ } \
+ \
+- wp=(W *)p->fw->frame->data[0]; \
++ wp=(W *)(void*)p->fw->frame->data[0]; \
+ wp+=channels*p->fw->nb_samples.frame; \
+ mp=wp+channels*p->nb_samples; \
+ \
+--- bs1770gain-0.4.3.orig/libffsox-2/ffsox_frame_convert_sox.c
++++ bs1770gain-0.4.3/libffsox-2/ffsox_frame_convert_sox.c
+@@ -98,10 +98,10 @@ static void convert_##sfx##i(convert_t *
+ \
+ (void)ch; \
+ \
+- rp=(T *)p->fr->frame->data[0]; \
++ rp=(T *)(void*)p->fr->frame->data[0]; \
+ rp+=channels*p->fr->nb_samples.frame; \
+ \
+- wp=(sox_sample_t *)p->fw->frame->data[0]; \
++ wp=(sox_sample_t *)(void*)p->fw->frame->data[0]; \
+ wp+=channels*p->fw->nb_samples.frame; \
+ mp=wp+channels*p->nb_samples; \
+ \
+@@ -184,11 +184,11 @@ static void convert_##sfx##p(convert_t *
+ SOX_SAMPLE_LOCALS; \
+ \
+ for (ch=0;ch<channels;++ch) { \
+- rp[ch]=(T *)p->fr->frame->data[ch]; \
++ rp[ch]=(T *)(void*)p->fr->frame->data[ch]; \
+ rp[ch]+=p->fr->nb_samples.frame; \
+ } \
+ \
+- wp=(sox_sample_t *)p->fw->frame->data[0]; \
++ wp=(sox_sample_t *)(void*)p->fw->frame->data[0]; \
+ wp+=channels*p->fw->nb_samples.frame; \
+ mp=wp+channels*p->nb_samples; \
+ \
+--- bs1770gain-0.4.3.orig/libffsox-2/ffsox_sox_pull_handler.c
++++ bs1770gain-0.4.3/libffsox-2/ffsox_sox_pull_handler.c
+@@ -32,7 +32,7 @@ static int getopts(sox_effect_t *e, int
+ {
+ priv_t *priv=e->priv;
+
+- priv->cb=1<argc?(pull_cb_t)argv[1]:NULL;
++ priv->cb=1<argc?(pull_cb_t)(void*)argv[1]:NULL;
+ priv->data=2<argc?(void *)argv[2]:NULL;
+
+ return SOX_SUCCESS;
+--- bs1770gain-0.4.3.orig/libffsox-2/ffsox_sox_read_handler.c
++++ bs1770gain-0.4.3/libffsox-2/ffsox_sox_read_handler.c
+@@ -36,7 +36,7 @@ static int getopts(sox_effect_t *e, int
+ goto argc;
+ }
+
+- priv->read=(sox_reader_t *)argv[1];
++ priv->read=(sox_reader_t *)(void*)argv[1];
+
+ return SOX_SUCCESS;
+ argc:
--
bs1770gain packaging
More information about the pkg-multimedia-commits
mailing list