[libgsf] gsf-timestamp: remove dead code



commit c688258ca34b47697b22b8c0db9f690bd56cb326
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Fri Jan 31 15:08:37 2020 +0100

    gsf-timestamp: remove dead code
    
    GMTOFF() is unused for a long while.
    
    Fixes:
    gsf-timestamp.c:103:15: warning: 'gmt_to_local_win32' defined but not
    used
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 gsf/gsf-timestamp.c | 32 --------------------------------
 1 file changed, 32 deletions(-)
---
diff --git a/gsf/gsf-timestamp.c b/gsf/gsf-timestamp.c
index 5a9de0a..3a54dc3 100644
--- a/gsf/gsf-timestamp.c
+++ b/gsf/gsf-timestamp.c
@@ -88,38 +88,6 @@ gsf_timestamp_free (GsfTimestamp *stamp)
        g_free (stamp);
 }
 
-#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
-#define GMTOFF(t) ((t).tm_gmtoff)
-#elif defined(HAVE_STRUCT_TM___TM_GMTOFF)
-#define GMTOFF(t) ((t).__tm_gmtoff)
-#elif defined(G_OS_WIN32)
-#define GMTOFF(t) (gmt_to_local_win32())
-#else
-/* FIXME: work out the offset anyway. */
-#define GMTOFF(t) (0)
-#endif
-
-#ifdef G_OS_WIN32
-static time_t gmt_to_local_win32(void)
-{
-    TIME_ZONE_INFORMATION tzinfo;
-    DWORD dwStandardDaylight;
-    long bias;
-
-    dwStandardDaylight = GetTimeZoneInformation(&tzinfo);
-    bias = tzinfo.Bias;
-
-    if (dwStandardDaylight == TIME_ZONE_ID_STANDARD)
-        bias += tzinfo.StandardBias;
-
-    if (dwStandardDaylight == TIME_ZONE_ID_DAYLIGHT)
-        bias += tzinfo.DaylightBias;
-
-    return (- bias * 60);
-}
-#endif
-
-
 /**
  * gsf_timestamp_load_from_string:
  * @stamp: #GsfTimestamp


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]