Skip to contentSkip to conversation

Yet more gcc warnings fixes

PATCH Applied Juan Quintela 5 participants 8 messages Jul 11, 2011 – Jul 27, 2011

lore
Share & tools
lore
#0 lore raw

cover Yet more gcc warnings fixes

More places that have write only variables.

Once here, why we have clovvered arg7 is a good question (TM)

abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8)
{

	.....
            abi_ulong arg_sigset, *arg7;
	....

Using a different name could be a good idea.

Please, apply.

Later, Juan.

Juan Quintela (2):
xen_mapcache: remove unused variable
syscall: pselect arg_sigsize variable was write only

 linux-user/syscall.c |    3 +--
 xen-mapcache.c       |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/2 xen_mapcache: remove unused variable

---
 xen-mapcache.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
xen-mapcache.c +1 -2
index fac47cd..e2e324d 100644
@@ -232,7 +232,7 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
 
 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 {
-    MapCacheEntry *entry = NULL, *pentry = NULL;
+    MapCacheEntry *entry = NULL;
     MapCacheRev *reventry;
     target_phys_addr_t paddr_index;
     target_phys_addr_t size;
@@ -258,7 +258,6 @@ ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 
     entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
     while (entry && (entry->paddr_index != paddr_index || entry->size != size)) {
-        pentry = entry;
         entry = entry->next;
     }
     if (!entry) {
Signature · 1 line
1.7.6
Acked-by on v1 1/2
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] xen_mapcache: remove unused variable

Quoted 2 lines · Juan Quintela
Quoted 29 lines
---
 xen-mapcache.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
xen-mapcache.c +1 -2
index fac47cd..e2e324d 100644
@@ -232,7 +232,7 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
 
 ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 {
-    MapCacheEntry *entry = NULL, *pentry = NULL;
+    MapCacheEntry *entry = NULL;
     MapCacheRev *reventry;
     target_phys_addr_t paddr_index;
     target_phys_addr_t size;
@@ -258,7 +258,6 @@ ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 
     entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
     while (entry && (entry->paddr_index != paddr_index || entry->size != size)) {
-        pentry = entry;
         entry = entry->next;
     }
     if (!entry) {
Signature · 1 line
1.7.6
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] xen_mapcache: remove unused variable

In reply to Juan Quintela
Quoted 1 line · Juan Quintela

Been pointed to this patch after having posted the same.

Stefan

Quoted 25 lines
---
  xen-mapcache.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
xen-mapcache.c +1 -2
index fac47cd..e2e324d 100644
@@ -232,7 +232,7 @@ uint8_t *qemu_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size, u
 
  ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
  {
-    MapCacheEntry *entry = NULL, *pentry = NULL;
+    MapCacheEntry *entry = NULL;
      MapCacheRev *reventry;
      target_phys_addr_t paddr_index;
      target_phys_addr_t size;
@@ -258,7 +258,6 @@ ram_addr_t qemu_ram_addr_from_mapcache(void *ptr)
 
      entry =&mapcache->entry[paddr_index % mapcache->nr_buckets];
      while (entry&&  (entry->paddr_index != paddr_index || entry->size != size)) {
-        pentry = entry;
          entry = entry->next;
      }
      if (!entry) {
#5 lore raw

PATCH 2/2 syscall: pselect arg_sigsize variable was write only

In reply to Juan Quintela

Remove it.

---
 linux-user/syscall.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
linux-user/syscall.c +1 -2
index fed7a8f..35bbe36 100644
@@ -5634,7 +5634,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
                 size_t size;
             } sig, *sig_ptr;
 
-            abi_ulong arg_sigset, arg_sigsize, *arg7;
+            abi_ulong arg_sigset, *arg7;
             target_sigset_t *target_sigset;
 
             n = arg1;
@@ -5679,7 +5679,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
                     goto efault;
                 }
                 arg_sigset = tswapl(arg7[0]);
-                arg_sigsize = tswapl(arg7[1]);
                 unlock_user(arg7, arg6, 0);
 
                 if (arg_sigset) {
Signature · 1 line
1.7.6