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 511825 - [RTSP] compiler warning on FreeBSD
[RTSP] compiler warning on FreeBSD
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.18
Assigned To: Sebastian Dröge (slomo)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-24 16:31 UTC by Sebastian Dröge (slomo)
Modified: 2008-02-02 10:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2008-01-24 16:31:17 UTC
Compiling gst-libs/gst/rtsp/gstrtspconnection.c on FreeBSD currently gives, with latest CVS, the following compiler warning. Patch below fixes it.

gstrtspconnection.c: In function `add_date_header':
gstrtspconnection.c:374: warning: passing arg 1 of `gmtime' from incompatible pointer type



diff -a -u -p -r1.8 gstrtspconnection.c
--- gst-libs/gst/rtsp/gstrtspconnection.c	16 Dec 2007 23:52:58 -0000	1.8
+++ gst-libs/gst/rtsp/gstrtspconnection.c	24 Jan 2008 16:29:29 -0000
@@ -371,7 +371,7 @@ add_date_header (GstRTSPMessage * messag
 
   g_get_current_time (&tv);
   strftime (date_string, sizeof (date_string), "%a, %d %b %Y %H:%M:%S GMT",
-      gmtime (&tv.tv_sec));
+      gmtime ((time_t *) &tv.tv_sec));
 
   gst_rtsp_message_add_header (message, GST_RTSP_HDR_DATE, date_string);
 }
Comment 1 Sebastian Dröge (slomo) 2008-01-24 16:31:53 UTC
Should be committed after freeze...
Comment 2 Sebastian Dröge (slomo) 2008-01-29 10:01:44 UTC
Committed...

2008-01-29  Sebastian Dröge  <slomo@circular-chaos.org>

        * gst-libs/gst/rtsp/gstrtspconnection.c: (add_date_header):
        Cast glong to time_t as time_t might have a different type on
        other platforms, like FreeBSD, and we get a compiler warning
        otherwise. Fixes bug #511825.