GNOME Bugzilla – Bug 750596
xingmux: FTBFS because of uninitialized variables
Last modified: 2015-06-10 14:45:22 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.
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/
[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