aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2015-10-28 08:05:11 +0100
committerAndreas Schneider <asn@samba.org>2015-10-28 10:24:53 +0100
commit218e64271dc0947721a0592e48f9f59f73565580 (patch)
tree60f9109cea1498f7d2cb79c656e082c5d36fe0ff
parentc273d99f9091b089081b5bc7a5cfbe00cd164164 (diff)
downloaduid_wrapper-218e64271dc0947721a0592e48f9f59f73565580.tar.gz
uid_wrapper-218e64271dc0947721a0592e48f9f59f73565580.tar.xz
uid_wrapper-218e64271dc0947721a0592e48f9f59f73565580.zip
uwrap: Fix build warning with release build
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--src/uid_wrapper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c
index 2702bd7..ab47dd0 100644
--- a/src/uid_wrapper.c
+++ b/src/uid_wrapper.c
@@ -1148,7 +1148,9 @@ static int uwrap_setreuid_args(uid_t ruid, uid_t euid,
static int uwrap_setreuid_thread(uid_t ruid, uid_t euid)
{
+#ifndef NDEBUG
struct uwrap_thread *id = uwrap_tls_id;
+#endif
uid_t new_ruid = -1, new_euid = -1, new_suid = -1;
int rc;
@@ -1167,7 +1169,9 @@ static int uwrap_setreuid_thread(uid_t ruid, uid_t euid)
#ifdef HAVE_SETREUID
static int uwrap_setreuid(uid_t ruid, uid_t euid)
{
+#ifndef NDEBUG
struct uwrap_thread *id = uwrap_tls_id;
+#endif
uid_t new_ruid = -1, new_euid = -1, new_suid = -1;
int rc;
@@ -1431,7 +1435,9 @@ static int uwrap_setregid_args(gid_t rgid, gid_t egid,
static int uwrap_setregid_thread(gid_t rgid, gid_t egid)
{
+#ifndef NDEBUG
struct uwrap_thread *id = uwrap_tls_id;
+#endif
gid_t new_rgid = -1, new_egid = -1, new_sgid = -1;
int rc;
@@ -1450,7 +1456,9 @@ static int uwrap_setregid_thread(gid_t rgid, gid_t egid)
#ifdef HAVE_SETREGID
static int uwrap_setregid(gid_t rgid, gid_t egid)
{
+#ifndef NDEBUG
struct uwrap_thread *id = uwrap_tls_id;
+#endif
gid_t new_rgid = -1, new_egid = -1, new_sgid = -1;
int rc;