From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 32/34] tools/libxl: list_domains: shutdown is typed unsigned Date: Tue, 25 Mar 2014 16:55:39 +0000 Message-ID: <1395766541-23979-33-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-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 1WSUen-0000zV-RC for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:56:58 +0000 Received: by mail-ee0-f52.google.com with SMTP id e49so687472eek.11 for ; Tue, 25 Mar 2014 09:56:56 -0700 (PDT) In-Reply-To: <1395766541-23979-1-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: xen-devel@lists.xenproject.org Cc: ian.campbell@citrix.com, Stefano Stabellini , tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org 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 && ~~~~~~~~~~~~~~~ ^ ~ 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)); -- 1.7.10.4