qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-ppc: Fix warnings from Sparse
@ 2015-03-07 22:16 Stefan Weil
  2015-03-08  8:58 ` Alexander Graf
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2015-03-07 22:16 UTC (permalink / raw)
  To: QEMU Trivial; +Cc: Stefan Weil, QEMU Developer, Alexander Graf

Sparse report:

target-ppc/mmu-hash64.c:353:9: warning: returning void-valued expression
target-ppc/mmu-hash64.c:620:9: warning: returning void-valued expression

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

Should we fix this kind of warnings? QEMU includes more than
60 lines of code which return a void expression.

Stefan

 target-ppc/mmu-hash64.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c
index b0278c9..a9e1b4c 100644
--- a/target-ppc/mmu-hash64.c
+++ b/target-ppc/mmu-hash64.c
@@ -350,7 +350,7 @@ uint64_t ppc_hash64_start_access(PowerPCCPU *cpu, target_ulong pte_index)
 void ppc_hash64_stop_access(uint64_t token)
 {
     if (kvmppc_kern_htab) {
-        return kvmppc_hash64_free_pteg(token);
+        kvmppc_hash64_free_pteg(token);
     }
 }
 
@@ -617,7 +617,8 @@ void ppc_hash64_store_hpte(CPUPPCState *env,
     CPUState *cs = CPU(ppc_env_get_cpu(env));
 
     if (kvmppc_kern_htab) {
-        return kvmppc_hash64_write_pte(env, pte_index, pte0, pte1);
+        kvmppc_hash64_write_pte(env, pte_index, pte0, pte1);
+        return;
     }
 
     pte_index *= HASH_PTE_SIZE_64;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc: Fix warnings from Sparse
  2015-03-07 22:16 [Qemu-devel] [PATCH] target-ppc: Fix warnings from Sparse Stefan Weil
@ 2015-03-08  8:58 ` Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2015-03-08  8:58 UTC (permalink / raw)
  To: Stefan Weil, QEMU Trivial; +Cc: QEMU Developer



On 07.03.15 23:16, Stefan Weil wrote:
> Sparse report:
> 
> target-ppc/mmu-hash64.c:353:9: warning: returning void-valued expression
> target-ppc/mmu-hash64.c:620:9: warning: returning void-valued expression
> 
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

I think it makes a lot of sense to fix these.

Thanks, applied to ppc-next (unfortunately after my pull request, so
it'll only go in after rc0).


Alex

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-08  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-07 22:16 [Qemu-devel] [PATCH] target-ppc: Fix warnings from Sparse Stefan Weil
2015-03-08  8:58 ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).