After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750596 - xingmux: FTBFS because of uninitialized variables
xingmux: FTBFS because of uninitialized variables
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
1.5.1
Other Linux
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-08 20:48 UTC by Chris
Modified: 2015-06-10 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix FTBFS (538 bytes, patch)
2015-06-08 20:48 UTC, Chris
none Details | Review

Description Chris 2015-06-08 20:48:15 UTC
Created attachment 304815 [details] [review]
Patch to fix FTBFS

xingmux.c fails to build with the following error log:

make[3]: Entering directory '/home/chris/rpm/BUILD/gst-plugins-ugly-1.5.1/gst/xingmux'
  CC       libgstxingmux_la-gstxingmux.lo
gstxingmux.c: In function 'generate_xing_header':
gstxingmux.c:320:24: error: 'rate' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     number_of_frames = gst_util_uint64_scale (duration, rate, GST_SECOND) / spf;
                        ^
gstxingmux.c:320:75: error: 'spf' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     number_of_frames = gst_util_uint64_scale (duration, rate, GST_SECOND) / spf;
                                                                           ^
gstxingmux.c:280:3: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   } while (size < (4 + xing_offset + 4 + 4 + 4 + 4 + 100) && bitrate < 0xe);
   ^
cc1: all warnings being treated as errors
Makefile:615: recipe for target 'libgstxingmux_la-gstxingmux.lo' failed
make[3]: *** [libgstxingmux_la-gstxingmux.lo] Error 1
make[3]: Leaving directory '/home/chris/rpm/BUILD/gst-plugins-ugly-1.5.1/gst/xingmux'

The variables are initialized in parse_header(), but that function can return FALSE if errors occur, leaving the variables uninitialized. The build failure is fixed by returning NULL (from generate_xing_header() (where the build error occurs) when parse_header() return FALSE.

Patch attached for comment.
Comment 1 Luis de Bethencourt 2015-06-10 14:29:34 UTC
Chris,

As Tim said in the other bug [1], please send patches using 'git format-patch'. You want something that can be applied using 'git am'. If not, it it is a lot more work for the reviewer to merge/test your patches.

Just in case:
git add gst/rtp/gstrtpvp8pay.c
git commit
git format-patch -o /tmp/ HEAD~1
attach here the 0001* patch file dropped in /tmp/
Comment 2 Luis de Bethencourt 2015-06-10 14:34:58 UTC
[1] https://bugzilla.gnome.org/show_bug.cgi?id=750601

Merged.

commit 0f80355ba555240c36e708034ff71e7bdce30a5d
Author: Chris Clayton <chris2553@googlemail.com>
Date:   Wed Jun 10 15:32:44 2015 +0100

    xingmux: fix compiler warnings

    https://bugzilla.gnome.org/show_bug.cgi?id=750596