GNOME Bugzilla – Bug 750601
uvch264: FTBFS because of uninitialized variables
Last modified: 2015-06-10 14:25:04 UTC
Created attachment 304819 [details] [review] Patch to fix FTBFS Build (with gcc-4.9-201406003) fails to build. Build log shows: make -C uvch264 make[3]: Entering directory '/home/chris/rpm/BUILD/gst-plugins-bad-1.5.1/sys/uvch264' CC libgstuvch264_la-gstuvch264_src.lo gstuvch264_src.c: In function 'gst_uvc_h264_src_get_boolean_setting': gstuvch264_src.c:1357:24: error: 'max' may be used uninitialized in this function [-Werror=maybe-uninitialized] *changeable = (min != max); ^ gstuvch264_src.c:1358:27: error: 'def' may be used uninitialized in this function [-Werror=maybe-uninitialized] *default_value = (def != 0); ^ gstuvch264_src.c:1357:24: error: 'min' may be used uninitialized in this function [-Werror=maybe-uninitialized] *changeable = (min != max); ^ cc1: all warnings being treated as errors Makefile:896: recipe for target 'libgstuvch264_la-gstuvch264_src.lo' failed make[3]: *** [libgstuvch264_la-gstuvch264_src.lo] Error 1 make[3]: Leaving directory '/home/chris/rpm/BUILD/gst-plugins-bad-1.5.1/sys/uvch264' Makefile:1097: recipe for target 'uvch264' failed make[2]: *** [uvch264] Error 2 make[2]: Leaving directory '/home/chris/rpm/BUILD/gst-plugins-bad-1.5.1/sys' Makefile:927: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/chris/rpm/BUILD/gst-plugins-bad-1.5.1' Makefile:855: recipe for target 'all' failed make: *** [all] Error 2 The varables are initialized by a call to probe_setting(), but that can return FALSE when an error occurs, leaving the variables uninitialized. Fix by checking the return value from probe_setting() and processing accordingly. A patch is attached for comment.
Thanks for the patch. Would be great if you could attach a git format-patch formatted patch next time, thanks! commit 376d8311785512de2a14fc2d16a376e5816ab7c0 Author: Chris Clayton <chris2553@googlemail.com> Date: Tue Jun 9 18:30:55 2015 +0100 uvch264src: fix compiler warnings https://bugzilla.gnome.org/show_bug.cgi?id=750601
Thanks Chris! :)