[Qemu-devel] Re: [PATCH 08/15] blkdebug: fix enum comparison'

2010-09-05 Thread Michael S. Tsirkin
On Sun, Sep 05, 2010 at 07:37:54PM +, Blue Swirl wrote: > On Sun, Sep 5, 2010 at 5:57 PM, Michael S. Tsirkin wrote: > > On Sun, Sep 05, 2010 at 03:06:32PM +, Blue Swirl wrote: > >> The signedness of enum types depend on the compiler implementation. > >> Therefore the check for negative val

[Qemu-devel] Re: [PATCH 08/15] blkdebug: fix enum comparison

2010-09-05 Thread Blue Swirl
On Sun, Sep 5, 2010 at 5:57 PM, Michael S. Tsirkin wrote: > On Sun, Sep 05, 2010 at 03:06:32PM +, Blue Swirl wrote: >> The signedness of enum types depend on the compiler implementation. >> Therefore the check for negative values may or may not be meaningful. >> >> Fix by explicitly casting to

[Qemu-devel] Re: [PATCH 08/15] blkdebug: fix enum comparison

2010-09-05 Thread Michael S. Tsirkin
On Sun, Sep 05, 2010 at 03:06:32PM +, Blue Swirl wrote: > The signedness of enum types depend on the compiler implementation. > Therefore the check for negative values may or may not be meaningful. > > Fix by explicitly casting to a signed integer. > > Since the values are also checked earlie