]> git.proxmox.com Git - qemu.git/commit
tcg: Fix compiler error (comparison of unsigned expression)
authorStefan Weil <weil@mail.berlios.de>
Fri, 8 Oct 2010 08:32:23 +0000 (10:32 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Wed, 20 Oct 2010 20:52:12 +0000 (20:52 +0000)
commitc3b08d0e05f381b0a02647038d454eecf51ae014
tree8aab9f1894d70aac3a94b689a561744e2276655e
parentb2d4d8329963b13c5cebe5944dcc99f0e9d1b5c7
tcg: Fix compiler error (comparison of unsigned expression)

When qemu is configured with --enable-debug-tcg,
gcc throws this warning (or error with -Werror):

tcg/tcg.c:1030: error: comparison of unsigned expression >= 0 is always true

Fix it by removing the >= 0 part.
The type cast to 'unsigned' catches negative values of op
(which should never happen).

This is a modification of Hollis Blanchard's patch.

Cc: Hollis Blanchard <hollis@penguinppc.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/tcg.c