Patchwork tcg-sparc: Fix parenthesis warning

login
register
mail settings
Submitter Richard Henderson
Date Sept. 6, 2013, 8:24 p.m.
Message ID <1378499051-25832-1-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/273330/
State New
Headers show

Comments

Richard Henderson - Sept. 6, 2013, 8:24 p.m.
error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/sparc/tcg-target.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Michael Tokarev - Sept. 14, 2013, 9:44 a.m.
07.09.2013 00:24, Richard Henderson wrote:
> error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]

Thanks, applied to the trivial-patches queue.

Cc'ing the SPARC code maintainer for possible NAK.

/mjt

Patch

diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 2edf858..1ff2922 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -153,7 +153,7 @@  typedef enum {
 static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
 {
     uintptr_t p;
-    for (p = start & -8; p < (stop + 7) & -8; p += 8) {
+    for (p = start & -8; p < ((stop + 7) & -8); p += 8) {
         __asm__ __volatile__("flush\t%0" : : "r" (p));
     }
 }