From a245fedc221ab689aae1595af6549f8f10e85f97 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 19 Apr 2017 09:39:55 -0600 Subject: [PATCH] Avoid unused variable when getgrouplist_2() is available. It would be nicer to just provide getgrouplist_2() (or the equivalent) and avoid the ugly #ifdefs. --- src/sudo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sudo.c b/src/sudo.c index 5dd090d6a..2fc8df873 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -384,7 +384,7 @@ fix_fds(void) static int fill_group_list(struct user_details *ud, int system_maxgroups) { - int tries, ret = -1; + int ret = -1; debug_decl(fill_group_list, SUDO_DEBUG_UTIL) /* @@ -408,6 +408,8 @@ fill_group_list(struct user_details *ud, int system_maxgroups) if (ud->ngroups != -1) ret = 0; #else + int tries; + /* * It is possible to belong to more groups in the group database * than NGROUPS_MAX. We start off with NGROUPS_MAX * 4 entries -- 2.40.0