From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [dpdk-dev] [PATCH 2/6] eal: use portable format attribute
Date: Fri, 31 Jan 2020 06:07:40 +0300 [thread overview]
Message-ID: <20200131030744.19596-3-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20200131030744.19596-1-dmitry.kozliuk@gmail.com>
Use portable format attribute for logging and panic messages.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
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
next prev parent reply other threads:[~2020-01-31 3:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 3:07 [dpdk-dev] [PATCH 0/6] MinGW-w64 support Dmitry Kozlyuk
2020-01-31 3:07 ` [dpdk-dev] [PATCH 1/6] eal: introduce portable format attribute Dmitry Kozlyuk
2020-01-31 3:07 ` Dmitry Kozlyuk [this message]
2020-01-31 3:07 ` [dpdk-dev] [PATCH 3/6] cmdline: use " Dmitry Kozlyuk
2020-01-31 3:07 ` [dpdk-dev] [PATCH 4/6] build: MinGW-w64 support for Meson Dmitry Kozlyuk
2020-02-04 22:08 ` Thomas Monjalon
2020-02-04 23:21 ` Dmitry Kozlyuk
2020-02-05 0:41 ` Thomas Monjalon
2020-02-05 14:30 ` Bruce Richardson
2020-02-05 20:41 ` Dmitry Kozlyuk
2020-02-06 10:59 ` Bruce Richardson
2020-02-07 19:27 ` Dmitry Kozlyuk
2020-01-31 3:07 ` [dpdk-dev] [PATCH 5/6] build: add cross-file for MinGW-w64 Dmitry Kozlyuk
2020-02-04 22:14 ` Thomas Monjalon
2020-02-04 23:23 ` Dmitry Kozlyuk
2020-01-31 3:07 ` [dpdk-dev] [PATCH 6/6] doc: guide for Windows build using MinGW-w64 Dmitry Kozlyuk
2020-02-04 22:34 ` Thomas Monjalon
2020-02-04 23:57 ` Dmitry Kozlyuk
2020-02-05 2:20 ` Thomas Monjalon
2020-02-09 21:39 ` Dmitry Kozlyuk
2020-02-17 6:27 ` Dmitry Kozlyuk
2020-04-29 13:57 ` Thomas Monjalon
2020-02-05 1:49 ` [dpdk-dev] [EXTERNAL] [PATCH 0/6] MinGW-w64 support Narcisa Ana Maria Vasile
2020-02-05 5:43 ` Dmitry Kozlyuk
2020-02-05 9:26 ` David Marchand
2020-02-05 20:59 ` Dmitry Kozlyuk
2020-02-05 21:02 ` Narcisa Ana Maria Vasile
2020-02-05 21:21 ` Dmitry Kozlyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200131030744.19596-3-dmitry.kozliuk@gmail.com \
--to=dmitry.kozliuk@gmail.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).