Re: [PATCH] building fix - do not check unsigned var >= 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Signed-off-by: Dave Young <hidave.darkstar@xxxxxxxxx>

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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux