From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRkyd-0000a4-5Z for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRkyY-0000c1-DR for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRkyX-0000be-L0 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 08:56:41 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p51CuexW031806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Jun 2011 08:56:40 -0400 From: Christophe Fergeau Date: Wed, 1 Jun 2011 14:56:32 +0200 Message-Id: <1306932992-30075-4-git-send-email-cfergeau@redhat.com> In-Reply-To: <1306932992-30075-1-git-send-email-cfergeau@redhat.com> References: <1306932992-30075-1-git-send-email-cfergeau@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] linux-user: Fix unused-but-set-variable warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christophe Fergeau This warning is new in gcc 4.6. Signed-off-by: Christophe Fergeau --- linux-user/linuxload.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/linux-user/linuxload.c b/linux-user/linuxload.c index ac8c486..e66a4ea 100644 --- a/linux-user/linuxload.c +++ b/linux-user/linuxload.c @@ -57,7 +57,7 @@ static int prepare_binprm(struct linux_binprm *bprm) { struct stat st; int mode; - int retval, id_change; + int retval; if(fstat(bprm->fd, &st) < 0) { return(-errno); @@ -73,14 +73,10 @@ static int prepare_binprm(struct linux_binprm *bprm) bprm->e_uid = geteuid(); bprm->e_gid = getegid(); - id_change = 0; /* Set-uid? */ if(mode & S_ISUID) { bprm->e_uid = st.st_uid; - if(bprm->e_uid != geteuid()) { - id_change = 1; - } } /* Set-gid? */ @@ -91,9 +87,6 @@ static int prepare_binprm(struct linux_binprm *bprm) */ if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { bprm->e_gid = st.st_gid; - if (!in_group_p(bprm->e_gid)) { - id_change = 1; - } } retval = read(bprm->fd, bprm->buf, BPRM_BUF_SIZE); -- 1.7.5.2