From f6934e6de6759b207e54e964ca0f32f06ef128d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 24 Mar 2023 18:34:36 +0200 Subject: [PATCH] datetime: Return G_MAXFLOAT instead of G_MAXDOUBLE for no timezone offset Returning G_MAXDOUBLE from a function returning a float is not going to work well and MSVC also correctly warns about this. Part-of: --- subprojects/gstreamer/gst/gstdatetime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gstreamer/gst/gstdatetime.c b/subprojects/gstreamer/gst/gstdatetime.c index 10e73e23e4..b945233fbf 100644 --- a/subprojects/gstreamer/gst/gstdatetime.c +++ b/subprojects/gstreamer/gst/gstdatetime.c @@ -334,7 +334,7 @@ gst_date_time_get_microsecond (const GstDateTime * datetime) * values, timezones before (to the west) of UTC have negative values. * If @datetime represents UTC time, then the offset is zero. * - * Return value: the offset from UTC in hours, or %G_MAXDOUBLE if none is set. + * Return value: the offset from UTC in hours, or %G_MAXFLOAT if none is set. */ gfloat gst_date_time_get_time_zone_offset (const GstDateTime * datetime) @@ -342,7 +342,7 @@ gst_date_time_get_time_zone_offset (const GstDateTime * datetime) g_return_val_if_fail (datetime != NULL, 0.0); if (!gst_date_time_has_time (datetime)) - return G_MAXDOUBLE; + return G_MAXFLOAT; return (g_date_time_get_utc_offset (datetime->datetime) / G_USEC_PER_SEC) / 3600.0;