From 37a4386d2c3260f8c4ed6b9268a5d48f847ec85b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 23 Nov 2006 03:28:58 +0000 Subject: [PATCH] Fix a unused-variable compiler warning. --- popt/popt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/popt/popt.c b/popt/popt.c index 756ddfee..a2c24e78 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -392,7 +392,6 @@ static int execCommand(poptContext con) poptItem item = con->doExec; const char ** argv; int argc = 0; - int rc; if (item == NULL) /*XXX can't happen*/ return POPT_ERROR_NOARG; @@ -432,8 +431,9 @@ static int execCommand(poptContext con) argv[argc] = NULL; + { #ifdef __hpux - rc = setresgid(getgid(), getgid(),-1); + int rc = setresgid(getgid(), getgid(),-1); if (rc) return POPT_ERROR_ERRNO; rc = setresuid(getuid(), getuid(),-1); if (rc) return POPT_ERROR_ERRNO; @@ -444,12 +444,12 @@ static int execCommand(poptContext con) * XXX from Norbert Warmuth */ #if defined(HAVE_SETUID) - rc = setgid(getgid()); + int rc = setgid(getgid()); if (rc) return POPT_ERROR_ERRNO; rc = setuid(getuid()); if (rc) return POPT_ERROR_ERRNO; #elif defined (HAVE_SETREUID) - rc = setregid(getgid(), getgid()); + int rc = setregid(getgid(), getgid()); if (rc) return POPT_ERROR_ERRNO; rc = setreuid(getuid(), getuid()); if (rc) return POPT_ERROR_ERRNO; @@ -457,6 +457,7 @@ static int execCommand(poptContext con) ; /* Can't drop privileges */ #endif #endif + } if (argv[0] == NULL) return POPT_ERROR_NOARG; -- 2.34.1