diff options
author | Ray Strode <halfline@gmail.com> | 2022-10-27 14:47:51 +0000 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-10-27 14:47:51 +0000 |
commit | 002b39bf345b1327159bab0fca053f69e8eb0f95 (patch) | |
tree | f88a52506e28152a7fa31a30660be421c677090b /daemon | |
parent | 379f0430bf32b8d23b2d104686bb3e73252f1f53 (diff) | |
parent | 301196fd46907a7ab8f66f563cc89f563d74ba27 (diff) | |
download | gdm-002b39bf345b1327159bab0fca053f69e8eb0f95.tar.gz |
Merge branch 'wip/abono/reduce-warnings' into 'main'
Fix some warnings
See merge request GNOME/gdm!181
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-local-display-factory.c | 1 | ||||
-rw-r--r-- | daemon/gdm-session-record.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index dc94cc3b..110c7986 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -373,7 +373,6 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact gboolean ret; GdmDisplay *display = NULL; gboolean is_initial = FALSE; - const char *session_type; g_autofree gchar *preferred_display_server = NULL; g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE); diff --git a/daemon/gdm-session-record.c b/daemon/gdm-session-record.c index 7719d0a8..3b41f9c1 100644 --- a/daemon/gdm-session-record.c +++ b/daemon/gdm-session-record.c @@ -80,12 +80,12 @@ static void record_set_timestamp (UTMP *u) { #if defined(HAVE_UT_UT_TV) - GTimeVal now = { 0 }; + gint64 now; /* Set time in TV format */ - g_get_current_time (&now); - u->ut_tv.tv_sec = now.tv_sec; - u->ut_tv.tv_usec = now.tv_usec; + now = g_get_real_time(); + u->ut_tv.tv_sec = now / G_USEC_PER_SEC; + u->ut_tv.tv_usec = now % G_USEC_PER_SEC; g_debug ("using ut_tv time %ld", (glong) u->ut_tv.tv_sec); #elif defined(HAVE_UT_UT_TIME) |