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 764119 - rtpmanager: Set to initial value for 'ntpns' in get_current_times()
rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-24 06:57 UTC by Minjae Kim
Modified: 2016-03-29 07:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpmanager: Set to initial value for 'ntpns' in get_current_times() (1.35 KB, patch)
2016-03-24 07:03 UTC, Minjae Kim
none Details | Review
rtpmanager: Set to initial value for 'ntpns' in get_current_times() (1.35 KB, patch)
2016-03-28 00:22 UTC, Minjae Kim
none Details | Review
rtpmanager: Set to initial value for 'ntpns' in get_current_times() (1.35 KB, patch)
2016-03-28 00:27 UTC, Minjae Kim
committed Details | Review

Description Minjae Kim 2016-03-24 06:57:57 UTC
In OE-build process for gst-plugins-good,
configure of build script(--enable-fatal-warnings) has to check
initial value for variable.
So I set up "ntpns" variable initialized to zero.
Comment 1 Minjae Kim 2016-03-24 07:03:13 UTC
Created attachment 324652 [details] [review]
rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Comment 2 Sebastian Dröge (slomo) 2016-03-24 08:24:02 UTC
Comment on attachment 324652 [details] [review]
rtpmanager: Set to initial value for 'ntpns' in get_current_times()

Can you paste the complete compiler warning here? This looks like a complete failure by the compiler, it seems like all paths are obviously initialized?
Comment 3 Minjae Kim 2016-03-25 01:53:26 UTC
/gst-plugins-good/gst/rtpmanager/gstrtpbin.c: In function 'gst_rtp_bin_handle_sync':
|/gst-plugins-good/gst/rtpmanager/gstrtpbin.c:1213:31: etnrror: 'ntpns' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|      ntpdiff = local_ntpnstime - ntpnstime;
|                                ^
| gst-plugins-good/gst/rtpmanager/gstrtpbin.c:1004:11: note: 'ntpns' was declared here
|    guint64 ntpns;
|            ^
| make -C wavparse
Comment 4 Minjae Kim 2016-03-25 02:00:01 UTC
when compile with --enable-fatal-warnings in OE build, If it is not initialized, this options always show this error. so I think that it has to need zero initialized.
Comment 5 Minjae Kim 2016-03-25 02:09:31 UTC
| gst-plugins-good/gst/rtpmanager/gstrtpsession.c: In function 'get_current_times':
| gst-plugins-good/gst/rtpmanager/gstrtpsession.c:963:16: error: 'ntpns' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|      *ntpnstime = ntpns;
|                 ^
| cc1: all warnings being treated as errors
| make[3]: *** [libgstrtpmanager_la-gstrtpsession.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....
Comment 6 Sebastian Dröge (slomo) 2016-03-25 08:30:21 UTC
It should be initialized to -1 if anything, but I don't understand how your compiler thinks it could be uninitialized. Please also report that to whoever patched the OE compiler :)

If you update the patch to initialize it to -1, I'll merge it.
Comment 7 Minjae Kim 2016-03-28 00:22:35 UTC
Created attachment 324854 [details] [review]
rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Comment 8 Minjae Kim 2016-03-28 00:23:42 UTC
I updated the patch to initialize it to -1.
Comment 9 Minjae Kim 2016-03-28 00:27:17 UTC
Created attachment 324856 [details] [review]
rtpmanager: Set to initial value for 'ntpns' in get_current_times()
Comment 10 Sebastian Dröge (slomo) 2016-03-29 07:24:12 UTC
Attachment 324856 [details] pushed as eb13a1d - rtpmanager: Set to initial value for 'ntpns' in get_current_times()