Skip to contentSkip to conversation

fix error: variable 'pid' set but not used

PATCH In review Paolo Bonzini 3 participants 3 messages Sep 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix error: variable 'pid' set but not used

/home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function 'aio_thread':
/home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable 'pid' set but not used [-Werror=unused-but-set-variable]

---
Kevin, can you add this to your block branch pull for today?

 posix-aio-compat.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
posix-aio-compat.c +0 -4
index 393fa4b..d3c1174 100644
@@ -311,10 +311,6 @@ static void posix_aio_notify_event(void);
 
 static void *aio_thread(void *unused)
 {
-    pid_t pid;
-
-    pid = getpid();
-
     mutex_lock(&lock);
     pending_threads--;
     mutex_unlock(&lock);
Signature · 1 line
1.7.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Paolo Bonzini

/home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function 'aio_thread':
/home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable 'pid' set but not used [-Werror=unused-but-set-variable]

---
       Kevin, can you add this to your block branch pull for today?

 posix-aio-compat.c |    4 ----

 1 files changed, 0 insertions(+), 4 deletions(-)
#2 lore raw
In reply to Paolo Bonzini

Am 20.09.2011 14:18, schrieb Paolo Bonzini:

Quoted 6 lines

/home/pbonzini/work/upstream/qemu/posix-aio-compat.c: In function 'aio_thread':
/home/pbonzini/work/upstream/qemu/posix-aio-compat.c:314:11: error: variable 'pid' set but not used [-Werror=unused-but-set-variable]

---
Kevin, can you add this to your block branch pull for today?

Thanks, merged it into Frediano's patch that caused the warning and pushed the update to my for-anthony branch.

Kevin