From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 32/34] tools/libxl: list_domains: shutdown is typed unsigned Date: Tue, 25 Mar 2014 18:22:52 +0000 Message-ID: <5331C97C.3060009@citrix.com> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> <1395766541-23979-33-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSW0R-0004MF-HH for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 18:23:23 +0000 In-Reply-To: <1395766541-23979-33-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: ian.campbell@citrix.com, Stefano Stabellini , tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 25/03/14 16:55, Julien Grall wrote: > Don't need to check if shutdown is positive. > > Fix compilation with clang 3.5: > xl_cmdimpl.c:3350:34: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] > (shutdown_reason >= 0 && > ~~~~~~~~~~~~~~~ ^ ~ Coverity-ID: 1055616 > Signed-off-by: Julien Grall > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > --- > tools/libxl/xl_cmdimpl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 8389468..e82620d 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -3324,8 +3324,7 @@ static void list_domains(int verbose, int context, int claim, int numa, > info[i].blocked ? 'b' : '-', > info[i].paused ? 'p' : '-', > info[i].shutdown ? 's' : '-', > - (shutdown_reason >= 0 && > - shutdown_reason < sizeof(shutdown_reason_letters)-1 > + (shutdown_reason < sizeof(shutdown_reason_letters)-1 > ? shutdown_reason_letters[shutdown_reason] : '?'), > info[i].dying ? 'd' : '-', > ((float)info[i].cpu_time / 1e9));