From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02296A0524; Fri, 31 Jan 2020 04:08:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CAB41C0C6; Fri, 31 Jan 2020 04:07:59 +0100 (CET) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by dpdk.org (Postfix) with ESMTP id 8FC101C0AF for ; Fri, 31 Jan 2020 04:07:54 +0100 (CET) Received: by mail-lj1-f175.google.com with SMTP id x14so5538264ljd.13 for ; Thu, 30 Jan 2020 19:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gxG5MVDIJU9ZSNekIBXd5nC27e5b11t9Fc+fEsEnEf0=; b=DgpSoheZfBJVk1mtZo809PYcWuqWoOsLmgBCGU/3Fx+zuQwhgkcPUD4pKCedRUgaq9 1UnIlyStTYKLBJRXb+FMz35zOLq3yG1bnY1Flr7sL9wqc3YwvAU8HVDVr5JggAY/X7y9 VN3rNcGlyVLOIb89UxOLKoWoae23MQ3sKYynB7AG+xcGzUlYlE0W7Coaw/Z032vzBmHE natbulNnp+2fmCiQGq1DyOd5Qq9cvJj3JMZZp5N52aBLhktO9sZpMOV6+s8NaC2PauFO k9CTClC1jOODMbtC9Nwghkc7tzzY7bv0nvT2hH5twR7542Y/08X9UYjCY8pWbxBpB8fH n0vQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=gxG5MVDIJU9ZSNekIBXd5nC27e5b11t9Fc+fEsEnEf0=; b=c9eRiCidFqtSysnJsewI62HjQ6I/koKvMLHwGK6rPYAFrr2nSJZ8egNvBUZz/4x2B7 /EI1vHRQ70ozXY3898MlpEwgMwd/b3mzew8rt33PnXSKwQ6YSKs/oejN0zvnG+ehmJVw qaPr9WqWh0AsTMcob5seh8cJhbFhlrLxMsTioqLjEgI+fZyLUOFFw4ozFfw1fek3TAz9 TzlEpHqnsKmwH+dU5rzrezicISU8IMAyihCvBlBvfa2D2qI3P0vV3Mm6yRArz6j/ryiV j06NqroqEdSyBQzK+Wr/TatBVbajuaueFFZaSzQVbGW5g5MTC+p8XOFoeucMa15K2wpd 7OTA== X-Gm-Message-State: APjAAAWytL18aRy9p1tPspangX2ufaejzqbURoXZ9SJNGggC5NeQmfkN rdm8DalAs50uoXt6StRD5co7MFdUhsUZ5A== X-Google-Smtp-Source: APXvYqwoa0ru0Lxzzmaeis9oEHpz9RYr8VDLnL1EhloEmO2knmZcDAiqAM6kcTuUw3PGkZi1J7AJlg== X-Received: by 2002:a05:651c:32b:: with SMTP id b11mr4647520ljp.203.1580440073951; Thu, 30 Jan 2020 19:07:53 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.googlemail.com with ESMTPSA id e12sm3630332lfc.70.2020.01.30.19.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2020 19:07:53 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Olivier Matz Date: Fri, 31 Jan 2020 06:07:41 +0300 Message-Id: <20200131030744.19596-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200131030744.19596-1-dmitry.kozliuk@gmail.com> References: <20200131030744.19596-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 3/6] cmdline: use portable format attribute X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use portable format attribute for output strings. Signed-off-by: Dmitry Kozlyuk diff --git a/lib/librte_cmdline/cmdline.h b/lib/librte_cmdline/cmdline.h index 27d2effdf..952a50829 100644 --- a/lib/librte_cmdline/cmdline.h +++ b/lib/librte_cmdline/cmdline.h @@ -7,6 +7,8 @@ #ifndef _CMDLINE_H_ #define _CMDLINE_H_ +#include + #include #include #include @@ -34,7 +36,7 @@ struct cmdline *cmdline_new(cmdline_parse_ctx_t *ctx, const char *prompt, int s_ void cmdline_set_prompt(struct cmdline *cl, const char *prompt); void cmdline_free(struct cmdline *cl); void cmdline_printf(const struct cmdline *cl, const char *fmt, ...) - __attribute__((format(printf,2,3))); + __rte_format(printf, 2, 3); int cmdline_in(struct cmdline *cl, const char *buf, int size); int cmdline_write_char(struct rdline *rdl, char c); -- 2.25.0