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 793732 - rtpulpfec: fix debug log printf format warning on 32-bit platforms
rtpulpfec: fix debug log printf format warning on 32-bit platforms
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.13.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-22 21:08 UTC by Arnaud B.
Modified: 2018-02-27 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix type on i386. (915 bytes, patch)
2018-02-22 21:08 UTC, Arnaud B.
committed Details | Review
rtpulpfeccommon: fix debug log printf format warning on 32-bit platforms (1.71 KB, patch)
2018-02-23 13:56 UTC, Arnaud B.
rejected Details | Review

Description Arnaud B. 2018-02-22 21:08:20 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
Comment 1 Tim-Philipp Müller 2018-02-23 10:03:49 UTC
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
Comment 2 Arnaud B. 2018-02-23 13:55:26 UTC
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. :)
Comment 3 Arnaud B. 2018-02-23 13:56:59 UTC
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. :)
Comment 4 Tim-Philipp Müller 2018-02-27 13:16:02 UTC
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!