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 A1E46A0524; Fri, 31 Jan 2020 04:08:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E97B1C0C0; Fri, 31 Jan 2020 04:07:58 +0100 (CET) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 9821E1C0AC for ; Fri, 31 Jan 2020 04:07:53 +0100 (CET) Received: by mail-lj1-f194.google.com with SMTP id y6so5627474lji.0 for ; Thu, 30 Jan 2020 19:07:53 -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=CcvlBJtd/EWPTS6QuDV24RBhXf5nKUwf9qYBJAGNiK8=; b=aAS6SRkP+waRITU/F9FGKzsPR0pMOVOycAfrDywx0aRIUaUNqcJcle65HEfKHLA21+ di/UVUF3YCPMCP90kAWEfLLfSntyF1HXFwRUXTcjoteK9ja+L2OLmwfpwSTbRlExqwnc IZY6PYPwn/4h4jBOmuD4jYzSXrxESIW1RpOTYJrkGt1FkZEmVtNMY6lcklUtBshh2Hqa Cn+q+k0aGu8QjzsXpb4ixQ9GgrO4/eeq5pjpsYUExPeewF0Yjezih78FHwrdCP9v0CK0 fbdO07sRUYBXtkemjMvJZx5r6RX9M92nY90WueE1FvLvB7dYfeUkuFT067Vt2RMgOyaM cZYw== 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=CcvlBJtd/EWPTS6QuDV24RBhXf5nKUwf9qYBJAGNiK8=; b=shn7njLOuECSgEOMSdCMCx+uwMXnXJea2JsOJPCUX5qB35wpfRwSFHLH6nGjPAsr6u JgFouSX4XgsbEwRmZ1d74o46/YfHS8DntqJqpS8mM4QHmrL5jlf5EjbfOdZAaonDa0kj siMULibRRWDLquyqGaz6nh/dJTiov0XQk5WWuXZdfbYbxyjz7+WTSjjNmgHZQeT2z7uA Zf7ilhnMLHoX6NKjoLEHrFWBJ71jA2rELBWy/wp739NgPxwobT+Lt9J1VjD4FVhtyHcR qWwkmGPdlN+1rzHKIvnpTiZz+afpSCEqzEjgtAnd2yWxPp5vcRScW8+fy58XsQJ5v8Qo cbMg== X-Gm-Message-State: APjAAAW2ToswPg3kmo8omNWLufEh9XIjEENfutx1v6jWHh2xtsZ4SO4Q s6SGm2va9uzSNA/Q0gvinlQ/UUJ9UzUkdg== X-Google-Smtp-Source: APXvYqz735deYX2D2LzlfaYNIS4lzLXXMdzqzTc6nSnO34L599FuANTYzQ+NhLrRRdJTHd/WlG3XWA== X-Received: by 2002:a2e:868c:: with SMTP id l12mr4659726lji.194.1580440072962; Thu, 30 Jan 2020 19:07:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2020 19:07:52 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk Date: Fri, 31 Jan 2020 06:07:40 +0300 Message-Id: <20200131030744.19596-3-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 2/6] 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 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. -- 2.25.0