GNOME Bugzilla – Bug 793732
rtpulpfec: fix debug log printf format warning on 32-bit platforms
Last modified: 2018-02-27 13:25:36 UTC
Created attachment 368798 [details] [review] Fix type on i386. I’m trying to fix GNOME Flatpak SDK images, and while x86_64 now builds correctly, i386 fails because of a missing cast in a macro[1]. rtpulpfeccommon.c: In function ‘rtp_ulpfec_log_fec_packet’: rtpulpfeccommon.c:432:27: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘guint64 {aka long long unsigned int}’ [-Werror=format=] GST_CAT_LEVEL_LOG (cat, level, object, ^ cc1: all warnings being treated as errors make[3]: *** [Makefile:1751: libgstrtp_la-rtpulpfeccommon.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .deps/libgstrtp_la-rtpstorage.Tpo .deps/libgstrtp_la-rtpstorage.Plo mv -f .deps/libgstrtp_la-rtpstoragestream.Tpo .deps/libgstrtp_la-rtpstoragestream.Plo mv -f .deps/libgstrtp_la-gstrtpstorage.Tpo .deps/libgstrtp_la-gstrtpstorage.Plo gstrtpulpfecdec.c: In function ‘gst_rtp_ulpfec_dec_handle_sink_event’: gstrtpulpfecdec.c:405:27: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘gsize {aka unsigned int}’ [-Werror=format=] GST_DEBUG_OBJECT (self, "Unrecovered / Recovered: %lu / %lu", ^ gstrtpulpfecdec.c:405:27: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘gsize {aka unsigned int}’ [-Werror=format=] cc1: all warnings being treated as errors I’m highly bad at understanding C types, and I haven’t an i386 real/virtual machine to test, so please excuse if my proposed patch is bad, it’s untested. I just hope you’ll be able to find a fix. Thanks! [1] warning, big! http://sdkbuilder1.gnome.org/logs/build-2018-02-22-082206/build-gnome-sdk-images-master-i386.txt
Thanks for the patch! commit e3a3d4fb7635108fd12f93bb96b2bce1bfaab382 (HEAD -> master) Author: Arnaud Bonatti <arnaud.bonatti@gmail.com> Date: Thu Feb 22 21:53:40 2018 +0100 rtpulpfec: fix debug log printf format warning on 32-bit platforms https://bugzilla.gnome.org/show_bug.cgi?id=793732
Well, it worked, but looks like the two errors were not linked. :( I should have been more cautious. Follows a patch that I hope will work for the second (first in the error log) error, please double check it looks logical. Thanks by the way to treat bugs reports this fast. :)
Created attachment 368826 [details] [review] rtpulpfeccommon: fix debug log printf format warning on 32-bit platforms Again, not sure it will work, I’m not good enough in C. Please correct it as you want, I’d just like the build to work at the end. :)
Thanks, but I don't think this patch is right - did you actually test it? :) I've pushed this now, which fixes it for me: commit 7b74816f07ac7b10158aa1831f7119ee23c662ac Author: Tim-Philipp Müller <tim@centricular.com> Date: Tue Feb 27 13:13:49 2018 +0000 rtp: fix another debug log printf format warning on 32-bit systems rtpulpfeccommon.c:432:27: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘guint64 {aka long long unsigned int}’ https://bugzilla.gnome.org/show_bug.cgi?id=793732 Please re-open if there are more issues, thanks!