From patchwork Sat Jan 13 21:21:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 860377 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bytheb-org.20150623.gappssmtp.com header.i=@bytheb-org.20150623.gappssmtp.com header.b="n154WLX+"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zJsy83zLtz9s7M for ; Sun, 14 Jan 2018 08:22:07 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 60085F33; Sat, 13 Jan 2018 21:22:03 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F4041F11 for ; Sat, 13 Jan 2018 21:22:01 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 4C564D0 for ; Sat, 13 Jan 2018 21:22:01 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id y80so6252889qkb.4 for ; Sat, 13 Jan 2018 13:22:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytheb-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=rWd7zDJa23KODkqFsT25hAWGUlftkWRGUTZETSkEi2Q=; b=n154WLX+5TSAqM+ndzsTFfU/w02nMlkl0fONiEewDjxJFA4zCbF8DYi+BjzTAUI1dn rzpASlLuD6Z9z1FAa6og0yaLdqTL3vUER8qEEm8NuRi7oB/Y+0AvTiSCZj9pQphR1kES hZo2KBSwTU30rGs0JAMcPFU5+eLkp83PR9UJLRFKptU7ty3E+Tgh7t4HEvVuOAYzirdl UEHwoKJ4iXuAwzgIYEVnkXszx97p2cc9buUsrgQf3Piyk3owfkAS2ooP8/SYt0WqwXFc X3+MyEiyE85mTcI9wS6IBU/zTXXlfh0H5mnnvYauJa8knEviALht+j5vzXf2LgBbMH+d 3KuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rWd7zDJa23KODkqFsT25hAWGUlftkWRGUTZETSkEi2Q=; b=Y3ewXxrfxfaVdwqgwGKRZENYScktAzfQTL5BRUA1YXyuS+Cn1aqZGf+X22VUbNUoWS +hqXYisRFYiDelrO5m/Os2nWprS5wGzPMv+ZFUuV4Fc0dZqxtlt7YB1akmErw2EYv6YE fCxMNZ0Xwt7fNNJQWzaMawoD3jTO3RQ4ShdLavAx9J4IY4zzlVTxCmeAcwQfwcvJv7oy 7wkthqZ+uCLLMy0gbTFWbTeAJQowakZkz5JMkWwFOZT/rAg1gk5JyypJYWDvygtVZ76L H9iYoYUgQ2+smW+jTJNFLSynDgfVV+RAfunvJsITF0b74kjHrydbDIy9yTrQgl0dSLMZ GQTw== X-Gm-Message-State: AKwxytfGYwi+BBl/P6NcYYUd0Ct01g01FQFV2sLaP7sCpTvSTlyaNSO0 ZQX/bzJc090k86h/X81io6wXlVf4 X-Google-Smtp-Source: ACJfBovVZ2zce4k37mvbt0vd+DJ9r6wW4CR5va8OaGFhOwJAMSzH7xOZHxLF7ZQkIJfEOe7FSqSlfA== X-Received: by 10.55.108.199 with SMTP id h190mr2140817qkc.78.1515878519688; Sat, 13 Jan 2018 13:21:59 -0800 (PST) Received: from dhcp-25.97.bos.redhat.com (c-73-149-173-228.hsd1.ma.comcast.net. [73.149.173.228]) by smtp.gmail.com with ESMTPSA id o5sm15819815qtc.72.2018.01.13.13.21.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 13 Jan 2018 13:21:58 -0800 (PST) From: Aaron Conole To: dev@openvswitch.org Date: Sat, 13 Jan 2018 16:21:51 -0500 Message-Id: <20180113212151.9607-1-aconole@bytheb.org> X-Mailer: git-send-email 2.14.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] odp-util: fix a compiler warning X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The result of a ternary operation will be promoted at least to int type. As such, the compiler may generate a warning as: format specifies type 'unsigned char' but the argument has type 'int' This commit explicitly casts the result to avoid the warning. Fixes: 74c4530dca93 ("ofproto-dpif: Don't slow-path controller actions with pause.") Cc: Justin Pettit Signed-off-by: Aaron Conole Acked-by: Ian Stokes Tested-by: Ian Stokes --- lib/odp-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/odp-util.c b/lib/odp-util.c index af995efca..16f9bcd54 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -488,8 +488,8 @@ format_odp_userspace_action(struct ds *ds, const struct nlattr *attr, ",controller_id=%"PRIu16 ",max_len=%"PRIu16, cookie.controller.reason, - cookie.controller.dont_send ? 1 : 0, - cookie.controller.continuation ? 1 : 0, + (uint8_t)(cookie.controller.dont_send ? 1 : 0), + (uint8_t)(cookie.controller.continuation ? 1 : 0), cookie.controller.recirc_id, ntohll(get_32aligned_be64( &cookie.controller.rule_cookie)),