* [PATCH] building fix - do not check unsigned var >= 0
@ 2010-10-13 2:32 Yang Ruirui
2010-11-02 18:58 ` Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Yang Ruirui @ 2010-10-13 2:32 UTC (permalink / raw)
To: kvm
fix following build error by do not check unsigned op >= 0:
CC x86_64-softmmu/tcg/tcg.o
cc1: warnings being treated as errors
/home/dave/git/qemu-kvm/tcg/tcg.c: In function ‘tcg_add_target_add_op_defs’:
/home/dave/git/qemu-kvm/tcg/tcg.c:1030: error: comparison of unsigned expression >= 0 is always true
make[1]: *** [tcg/tcg.o] Error 1
Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
tcg/tcg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- qemu-kvm.orig/tcg/tcg.c 2010-06-29 14:45:04.000000000 +0800
+++ qemu-kvm/tcg/tcg.c 2010-09-26 18:07:26.523339798 +0800
@@ -1027,7 +1027,7 @@ void tcg_add_target_add_op_defs(const TC
if (tdefs->op == (TCGOpcode)-1)
break;
op = tdefs->op;
- assert(op >= 0 && op < NB_OPS);
+ assert(op < NB_OPS);
def = &tcg_op_defs[op];
#if defined(CONFIG_DEBUG_TCG)
/* Duplicate entry in op definitions? */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] building fix - do not check unsigned var >= 0
2010-10-13 2:32 [PATCH] building fix - do not check unsigned var >= 0 Yang Ruirui
@ 2010-11-02 18:58 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2010-11-02 18:58 UTC (permalink / raw)
To: Yang Ruirui; +Cc: kvm
On Wed, Oct 13, 2010 at 10:32:18AM +0800, Yang Ruirui wrote:
> fix following build error by do not check unsigned op >= 0:
>
> CC x86_64-softmmu/tcg/tcg.o
> cc1: warnings being treated as errors
> /home/dave/git/qemu-kvm/tcg/tcg.c: In function ‘tcg_add_target_add_op_defs’:
> /home/dave/git/qemu-kvm/tcg/tcg.c:1030: error: comparison of unsigned expression >= 0 is always true
> make[1]: *** [tcg/tcg.o] Error 1
>
> Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
I think Blue Swirl was replacing these with range macros from range.h
> ---
> tcg/tcg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- qemu-kvm.orig/tcg/tcg.c 2010-06-29 14:45:04.000000000 +0800
> +++ qemu-kvm/tcg/tcg.c 2010-09-26 18:07:26.523339798 +0800
> @@ -1027,7 +1027,7 @@ void tcg_add_target_add_op_defs(const TC
> if (tdefs->op == (TCGOpcode)-1)
> break;
> op = tdefs->op;
> - assert(op >= 0 && op < NB_OPS);
> + assert(op < NB_OPS);
> def = &tcg_op_defs[op];
> #if defined(CONFIG_DEBUG_TCG)
> /* Duplicate entry in op definitions? */
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-02 18:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 2:32 [PATCH] building fix - do not check unsigned var >= 0 Yang Ruirui
2010-11-02 18:58 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.