Skip to contentSkip to conversation

target-s390x: Fix wrong comparison in interrupt handling

PATCH New Stefan Weil 1 participant 1 message Feb 3, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-s390x: Fix wrong comparison in interrupt handling

gcc with -Wextra complains about an ordered pointer comparison:

target-s390x/helper.c:660:27: warning:
ordered comparison of pointer with integer zero [-Wextra]

Obviously the index was missing in the code.

---

I hope my analysis and the fix is correct - please review.

For local builds, I always compile with -Wextra. This bug shows that -Wextra would be good as a default compiler option for QEMU. Of course some extra warnings must be explicitly disabled then. I'll send a patch for this after 1.4.

Regards,

Stefan W.

 target-s390x/helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-s390x/helper.c +1 -1
index 3180b90..8bd84ef 100644
@@ -657,7 +657,7 @@ static void do_io_interrupt(CPUS390XState *env)
         cpu_unmap_lowcore(lowcore);
 
         env->io_index[isc]--;
-        if (env->io_index >= 0) {
+        if (env->io_index[isc] >= 0) {
             disable = 0;
         }
         break;
Signature · 1 line
1.7.10.4