Skip to contentSkip to conversation

virtio-9p: Remove statement without effect (fix warning from cppcheck)

PATCH Applied Stefan Weil 3 participants 3 messages May 7, 2011 – Jun 3, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-9p: Remove statement without effect (fix warning from cppcheck)

cppcheck report:
virtio-9p.c:197: warning: Redundant assignment of "flags" to itself

Cc Venkateswararao Jujjuri <[email protected]>
---
 hw/9pfs/virtio-9p.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
hw/9pfs/virtio-9p.c +0 -1
index ac5a1d0..d31b34a 100644
@@ -194,7 +194,6 @@ static int v9fs_do_open2(V9fsState *s, char *fullname, uid_t uid, gid_t gid,
     cred.fc_uid = uid;
     cred.fc_gid = gid;
     cred.fc_mode = mode & 07777;
-    flags = flags;
 
     return s->ops->open2(&s->ctx, fullname, flags, &cred);
 }
Signature · 1 line
1.7.2.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Stefan Weil

cppcheck report:
virtio-9p.c:197: warning: Redundant assignment of "flags" to itself

Cc Venkateswararao Jujjuri<[email protected]>

BTW, New threading model will change these functions completely. But in the mean while, we can keep merging these fixes as they come.

Thanks,
JV

Quoted 15 lines
---
  hw/9pfs/virtio-9p.c |    1 -
  1 files changed, 0 insertions(+), 1 deletions(-)
hw/9pfs/virtio-9p.c +0 -1
index ac5a1d0..d31b34a 100644
@@ -194,7 +194,6 @@ static int v9fs_do_open2(V9fsState *s, char *fullname, uid_t uid, gid_t gid,
      cred.fc_uid = uid;
      cred.fc_gid = gid;
      cred.fc_mode = mode&  07777;
-    flags = flags;
      return s->ops->open2(&s->ctx, fullname, flags,&cred);
  }
#2 lore raw
In reply to Stefan Weil
Quoted 8 lines · Stefan Weil

cppcheck report:
virtio-9p.c:197: warning: Redundant assignment of "flags" to itself

Cc Venkateswararao Jujjuri <[email protected]>
---
 hw/9pfs/virtio-9p.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Thanks, applied.

Quoted 17 lines
hw/9pfs/virtio-9p.c +0 -1
index ac5a1d0..d31b34a 100644
@@ -194,7 +194,6 @@ static int v9fs_do_open2(V9fsState *s, char *fullname, uid_t uid, gid_t gid,
     cred.fc_uid = uid;
     cred.fc_gid = gid;
     cred.fc_mode = mode & 07777;
-    flags = flags;
 
     return s->ops->open2(&s->ctx, fullname, flags, &cred);
 }
Signature · 1 line
1.7.2.5
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net