[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] linux-user: Fix unused-but-set-variable warning
From: |
Christophe Fergeau |
Subject: |
[Qemu-devel] [PATCH 3/3] linux-user: Fix unused-but-set-variable warning |
Date: |
Wed, 1 Jun 2011 14:56:32 +0200 |
This warning is new in gcc 4.6.
Signed-off-by: Christophe Fergeau <address@hidden>
---
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