From patchwork Tue Jan 16 14:05:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 861585 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="UVvxj7jE"; 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 3zLX825v2Fz9s1h for ; Wed, 17 Jan 2018 01:06:04 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 092801071; Tue, 16 Jan 2018 14:06:01 +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 A4F4E101A for ; Tue, 16 Jan 2018 14:05:59 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 09CA75B8 for ; Tue, 16 Jan 2018 14:05:58 +0000 (UTC) Received: by mail-qk0-f194.google.com with SMTP id w1so20966195qka.2 for ; Tue, 16 Jan 2018 06:05:58 -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=Mom78P420WjHVTDmv/MhC15Gjrvm/Amk+QDdkNZ9atY=; b=UVvxj7jE8MQF7GCZom66JOQRL9TaNjVwObO4mkV54ncRKM7DaCHrHrAsfsIiPo11NC 2vXoTqOcv0X05PM/cdJ/fcS7KSkGkBfnFBvHKwRVrANJSmAvux2jrVKyjA+fCyTDAiPC CLT8+UJIc0iUVfAx7NjdtPfMCY3zXotcGCbB305TzxsDGeieDT00vAgjH0Gwlthn4F6r G6UV9N4Zu5jDX3tidDIZ6TjqMvMnJvtRN8lvAqQhm95sKyWKUHFMfkul3uQQVeknsIlv 0YHm/jvnaNeWEorf2wWfAUbRhb7wRpLgCO97yhbprC9RgBhzP4oPkIvyYJXS7Y7kJe4t aJLw== 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=Mom78P420WjHVTDmv/MhC15Gjrvm/Amk+QDdkNZ9atY=; b=nKMIQzmjIvOqJNHxGAbWNkDIFnnK5oo9n5NfJv6nMP1eCLvLKXVDRCJwiH6qRRpdFd b0RIQRUAIp5tBNLrAJCBgI+Jf1W9/Xe5A1rcX+ZmWXldvY95KFcFZqe01NY/uiSODFKF ZeJRxLOsg1Sd0tG36DRkE7vPjEhXCu+EPztpM2eBG+h6VB4NFzbGr0gjRMoH897HEy6m ZeKhgYhTFjkvABHyHDuJJO+gdL6uD5J+/YOMW92SDMmRLOJtcjhswFgTDS4xcslMSJRs PTdCAWpES+IGQpADmVVa0P3T1gv8UNqUnzKPpBhzZI3zj6AE6Vd6Aw5SnlIx1yhqzeob WbvQ== X-Gm-Message-State: AKwxytf5Ps72kGOJHlBQGZTCGaNuoKc0ODEtrTXXab4KltLej6Fa+tPR YYYtkdiqj463tyqMDaLHUfQJfUQI X-Google-Smtp-Source: ACJfBotfJ68nSq4p3y7tyCyyHeCm0tgVp2johNqg5h9BNhILCTg4hVPggfNzeCeoiInvVqq+Ed80DA== X-Received: by 10.55.51.18 with SMTP id z18mr7203782qkz.103.1516111552784; Tue, 16 Jan 2018 06:05:52 -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 v45sm1438367qtc.45.2018.01.16.06.05.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jan 2018 06:05:51 -0800 (PST) From: Aaron Conole To: dev@openvswitch.org Date: Tue, 16 Jan 2018 09:05:47 -0500 Message-Id: <20180116140547.2596-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 v2] 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' Squelch this by preferring the %d format specifier to print 1/0 values. 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 --- v1->v2: instead of using a cast, use a different format string. 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..8a5e9e82e 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -481,8 +481,8 @@ format_odp_userspace_action(struct ds *ds, const struct nlattr *attr, ds_put_char(ds, ')'); } else if (cookie.type == USER_ACTION_COOKIE_CONTROLLER) { ds_put_format(ds, ",controller(reason=%"PRIu16 - ",dont_send=%"PRIu8 - ",continuation=%"PRIu8 + ",dont_send=%d" + ",continuation=%d" ",recirc_id=%"PRIu32 ",rule_cookie=%#"PRIx64 ",controller_id=%"PRIu16