From 4525c294ea4cfc9f6401565fd8e8c09c07fb6755 Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Tue, 14 Apr 2015 18:52:25 +0300 Subject: unix_user should be cast to a uid_t (int)unix_user should be (uid_t) because it may be (un)signed. POSIX is vague about the datatype http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_12 --- src/ck-session-leader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ck-session-leader.c b/src/ck-session-leader.c index 37aabd0..2b392b6 100644 --- a/src/ck-session-leader.c +++ b/src/ck-session-leader.c @@ -235,7 +235,7 @@ parse_output (CkSessionLeader *leader, if (unix_user < 0) continue; - element = g_variant_new (variant_type, (int)unix_user); + element = g_variant_new (variant_type, (uid_t)unix_user); break; default: g_warning ("ck-session-leader unsupported type"); -- cgit v1.2.3