]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virlog: Fix build breaker with "comparison between signed and unsigned"
authorErik Skultety <eskultet@redhat.com>
Wed, 16 Mar 2016 15:22:30 +0000 (16:22 +0100)
committerErik Skultety <eskultet@redhat.com>
Wed, 16 Mar 2016 20:33:11 +0000 (21:33 +0100)
commite6367dd408659e7118f4a46c27daee5b749a9b74
treee0372c565ff4ffd2ea4a7bf72f0b248f62280819
parentbb2f63da7998852ae94cf642f3209384027c64b2
virlog: Fix build breaker with "comparison between signed and unsigned"

Refactor series 0b231195 worked with virLogDestination type which, depending
on the compiler, might be (and probably will be) an unsigned data type.
However, virEnumFromString may return -1 in case of an error. So, when enum
happens to be unsigned, some compilers will naturally complain about foo:
    'if (foo < 0)'
src/util/virlog.c