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 508175 - GST_TIMEVAL_TO_TIME() and GST_TIMESPEC_TO_TIME() need to be cast to GstClockTime
GST_TIMEVAL_TO_TIME() and GST_TIMESPEC_TO_TIME() need to be cast to GstClockTime
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal minor
: 0.10.16
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-08 22:45 UTC by Peter Kjellerstedt
Modified: 2008-01-09 12:22 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Make GST_TIMEVAL_TO_TIME() and GST_TIMESPEC_TO_TIME() cast to GstClockTime (976 bytes, patch)
2008-01-08 22:46 UTC, Peter Kjellerstedt
committed Details | Review

Description Peter Kjellerstedt 2008-01-08 22:45:17 UTC
Please describe the problem:
The macros GST_TIMEVAL_TO_TIME() and GST_TIMESPEC_TO_TIME() need to cast their generated values to GstClockTime. Otherwise one will get a warning like 

gstrtspconnection.c:266: warning: signed and unsigned type in conditional expression

when using a construct like

  to = timeout ? GST_TIMEVAL_TO_TIME (*timeout) : GST_CLOCK_TIME_NONE;

since timeout->tv_sec and timeout->tv_usec are longs...


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Peter Kjellerstedt 2008-01-08 22:46:09 UTC
Created attachment 102427 [details] [review]
Make GST_TIMEVAL_TO_TIME() and GST_TIMESPEC_TO_TIME() cast to GstClockTime
Comment 2 Wim Taymans 2008-01-09 12:22:22 UTC
        Patch by: Peter Kjellerstedt <pkj axis com>

        * gst/gstclock.h:
        Cast the results from the timeval/spec_to_time macros to what the 
        docs say it casts to, a GstClockTime. fixes #508175.