From patchwork Thu Feb 6 06:44:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 65609 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 52AF0A04FA; Thu, 6 Feb 2020 07:45:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8CA9D1C025; Thu, 6 Feb 2020 07:44:43 +0100 (CET) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by dpdk.org (Postfix) with ESMTP id 7BB291BFAA for ; Thu, 6 Feb 2020 07:44:40 +0100 (CET) Received: by mail-lj1-f173.google.com with SMTP id d10so4860976ljl.9 for ; Wed, 05 Feb 2020 22:44:40 -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=onHpZxFRZr6ufes+hi2kn4mm+vpbAuHtSS11alSU2xk=; b=N75lKsVrrctkz6LuE0ZCoYXt6tWEbPuWUbxromxHX4JSufogv4uEJdmg10YBvQB7Ko 1jEhBys6iOw6JOWd8JeUtxHOG02bb5vmvmHahNGIE1hn+Xlvim48uXJQUZaCgazuqc+9 OcJSK6Ja2lkPdU7yTlB8fCu8PNur9LWyPB886ugtr4YniYX0LPdhf5QW3Bx6HwfcTgYt MH0afgF8yH+hnEj+x4mlNTTU93mn2QUsFJ/lqCxt9xDoZgt3amgcdXw+Y/3ExOkUps1A QOJI0GCI6hpMy4e1SFBB7uM3JBx1NpbU+8KLnANzKR/NSP92K0yEpaGSoMYQUwc1/EqJ 8KVA== 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=onHpZxFRZr6ufes+hi2kn4mm+vpbAuHtSS11alSU2xk=; b=lLGT9vkcX1yS7yieRyN0XZ0JjDNqnUwE/Fp5C1Rj/9CJTFFrvhQENz87MKqAyzMghE EC2AgSsO0TCH3YGKlHxcpLdKUyB4BBOqrq15b/aoGSpDuQRvcelInbyWs1FHOlfy0cJU /Ai8PNXc+t51/3lDsLiw+oQpSQiWdowDepZgdbE4s6K2NUwRMH0NtHdi8h9aImYukcul EDNJnByDCP6InBb4Mv7u37o1xTUCErNgKGU6KtOhPfACC7I719mrmn0l2wX79L85euDJ ghyZd3/Olg/byeyA69RO9eEbxIfTFwXJTpSrC/KthX4ctz4qzcI/94Td0SIcLtuT2RXF 4NsA== X-Gm-Message-State: APjAAAUqi85V7aB6kxd2GxdIA8Ho2Xb+43zVao7YtaQgQvovu83vFPjB L6v657+H/djmrZmLIiN1EjWncQFq/2w= X-Google-Smtp-Source: APXvYqxwh+oVKm/9guCdFRCfstDuEWjdZGD0fp82neVGdil2MbbO+1iHw5ka3BBvTvLYKx1IC0MUPg== X-Received: by 2002:a2e:9d89:: with SMTP id c9mr1097689ljj.212.1580971479843; Wed, 05 Feb 2020 22:44:39 -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 o19sm939669lji.54.2020.02.05.22.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 22:44:39 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk Date: Thu, 6 Feb 2020 09:44:21 +0300 Message-Id: <20200206064426.45697-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200206064426.45697-1-dmitry.kozliuk@gmail.com> References: <20200206064426.45697-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/7] eal: 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 logging and panic messages. Signed-off-by: Dmitry Kozlyuk --- lib/librte_eal/common/include/rte_common.h | 2 +- lib/librte_eal/common/include/rte_debug.h | 2 +- lib/librte_eal/common/include/rte_devargs.h | 2 +- lib/librte_eal/common/include/rte_log.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index 2f086bb9c..dc406ce27 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -799,7 +799,7 @@ rte_str_to_size(const char *str) void rte_exit(int exit_code, const char *format, ...) __attribute__((noreturn)) - __attribute__((format(printf, 2, 3))); + __rte_format(printf, 2, 3); #ifdef __cplusplus } diff --git a/lib/librte_eal/common/include/rte_debug.h b/lib/librte_eal/common/include/rte_debug.h index 748d32c80..c47c6bcdc 100644 --- a/lib/librte_eal/common/include/rte_debug.h +++ b/lib/librte_eal/common/include/rte_debug.h @@ -73,7 +73,7 @@ void __rte_panic(const char *funcname , const char *format, ...) #endif #endif __attribute__((noreturn)) - __attribute__((format(printf, 2, 3))); + __rte_format(printf, 2, 3); #ifdef __cplusplus } diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index 882dfa0ab..4418e02f2 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -137,7 +137,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *dev); int rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) -__attribute__((format(printf, 2, 0))); +__rte_format(printf, 2, 0); /** * Insert an rte_devargs in the global list. diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index 1bb0e6694..823efea4e 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -282,7 +282,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...) __attribute__((cold)) #endif #endif - __attribute__((format(printf, 3, 4))); + __rte_format(printf, 3, 4); /** * Generates a log message. @@ -311,7 +311,7 @@ int rte_log(uint32_t level, uint32_t logtype, const char *format, ...) * - Negative on error. */ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) - __attribute__((format(printf,3,0))); + __rte_format(printf, 3, 0); /** * Generates a log message.