From 8915eacef88eb25ac94e6bb37b473adb326e9d1b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 26 Nov 2014 20:54:16 +0000 Subject: Avoid warnings for unused results in nscd/connections.c. This patch avoids warnings for unused results of setuid and setgid in nscd/connections.c using an ignore_value macro along the lines suggested by Paul in . Tested for x86_64. * include/libc-internal.h (ignore_value): New macro. * nscd/connections.c (restart): Wrap calls to setuid and setgid with ignore_value. --- nscd/connections.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nscd/connections.c') diff --git a/nscd/connections.c b/nscd/connections.c index 3e950af9f1..1631212980 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1464,7 +1464,7 @@ cannot change to old UID: %s; disabling paranoia mode"), cannot change to old GID: %s; disabling paranoia mode"), strerror (errno)); - setuid (server_uid); + ignore_value (setuid (server_uid)); paranoia = 0; return; } @@ -1479,8 +1479,8 @@ cannot change to old working directory: %s; disabling paranoia mode"), if (server_user != NULL) { - setuid (server_uid); - setgid (server_gid); + ignore_value (setuid (server_uid)); + ignore_value (setgid (server_gid)); } paranoia = 0; return; @@ -1524,8 +1524,8 @@ cannot change to old working directory: %s; disabling paranoia mode"), if (server_user != NULL) { - setuid (server_uid); - setgid (server_gid); + ignore_value (setuid (server_uid)); + ignore_value (setgid (server_gid)); } if (chdir ("/") != 0) dbg_log (_("cannot change current working directory to \"/\": %s"), -- cgit 1.4.1