From: Erik Skultety Date: Wed, 16 Mar 2016 15:22:30 +0000 (+0100) Subject: virlog: Fix build breaker with "comparison between signed and unsigned" X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e6367dd408659e7118f4a46c27daee5b749a9b74;p=libvirt.git 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)' --- diff --git a/src/util/virlog.c b/src/util/virlog.c index 591d38e413..007fc65ebf 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -1088,7 +1088,7 @@ virLogParseOutput(const char *src) char *abspath = NULL; size_t count = 0; virLogPriority prio; - virLogDestination dest; + int dest; bool isSUID = virIsSUID(); if (!src)