Patchwork fix error: variable 'pid' set but not used

login
register
mail settings
Submitter Paolo Bonzini
Date Sept. 20, 2011, 12:18 p.m.
Message ID <1316521098-12825-1-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/115519/
State New
Headers show

Comments

Paolo Bonzini - Sept. 20, 2011, 12:18 p.m.
/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]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
	Kevin, can you add this to your block branch pull for today?

 posix-aio-compat.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Stefan Hajnoczi - Sept. 20, 2011, 12:20 p.m.
On Tue, Sep 20, 2011 at 1:18 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> /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]
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>        Kevin, can you add this to your block branch pull for today?
>
>  posix-aio-compat.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Kevin Wolf - Sept. 20, 2011, 12:37 p.m.
Am 20.09.2011 14:18, schrieb 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]
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 	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

Patch

diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index 393fa4b..d3c1174 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -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);