From: Stefan Puiu <stefan.puiu@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] Headers: more C++11 compilation fixes
Date: Fri, 20 Feb 2015 15:23:26 +0200 [thread overview]
Message-ID: <1424438606-1130-2-git-send-email-stefan.puiu@gmail.com> (raw)
In-Reply-To: <1424438606-1130-1-git-send-email-stefan.puiu@gmail.com>
Fixed two more places where non-C++11 string concatenation is
used. Spotted by John McNamara.
Signed-off-by: Stefan Puiu <stefan.puiu@gmail.com>
---
lib/librte_mempool/rte_mempool.h | 8 ++++----
lib/librte_vhost/vhost-net-cdev.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 3314651..48e9972 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -342,7 +342,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
if (cookie != RTE_MEMPOOL_HEADER_COOKIE1) {
rte_log_set_history(0);
RTE_LOG(CRIT, MEMPOOL,
- "obj=%p, mempool=%p, cookie=%"PRIx64"\n",
+ "obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
obj, mp, cookie);
rte_panic("MEMPOOL: bad header cookie (put)\n");
}
@@ -352,7 +352,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
if (cookie != RTE_MEMPOOL_HEADER_COOKIE2) {
rte_log_set_history(0);
RTE_LOG(CRIT, MEMPOOL,
- "obj=%p, mempool=%p, cookie=%"PRIx64"\n",
+ "obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
obj, mp, cookie);
rte_panic("MEMPOOL: bad header cookie (get)\n");
}
@@ -363,7 +363,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
cookie != RTE_MEMPOOL_HEADER_COOKIE2) {
rte_log_set_history(0);
RTE_LOG(CRIT, MEMPOOL,
- "obj=%p, mempool=%p, cookie=%"PRIx64"\n",
+ "obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
obj, mp, cookie);
rte_panic("MEMPOOL: bad header cookie (audit)\n");
}
@@ -372,7 +372,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
if (cookie != RTE_MEMPOOL_TRAILER_COOKIE) {
rte_log_set_history(0);
RTE_LOG(CRIT, MEMPOOL,
- "obj=%p, mempool=%p, cookie=%"PRIx64"\n",
+ "obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
obj, mp, cookie);
rte_panic("MEMPOOL: bad trailer cookie\n");
}
diff --git a/lib/librte_vhost/vhost-net-cdev.h b/lib/librte_vhost/vhost-net-cdev.h
index 03a5c57..37e4ad2 100644
--- a/lib/librte_vhost/vhost-net-cdev.h
+++ b/lib/librte_vhost/vhost-net-cdev.h
@@ -55,9 +55,9 @@
char packet[VHOST_MAX_PRINT_BUFF]; \
\
if ((header)) \
- snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%"PRIu64") Header size %d: ", (device->device_fh), (size)); \
+ snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%" PRIu64 ") Header size %d: ", (device->device_fh), (size)); \
else \
- snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%"PRIu64") Packet size %d: ", (device->device_fh), (size)); \
+ snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%" PRIu64 ") Packet size %d: ", (device->device_fh), (size)); \
for (index = 0; index < (size); index++) { \
snprintf(packet + strnlen(packet, VHOST_MAX_PRINT_BUFF), VHOST_MAX_PRINT_BUFF - strnlen(packet, VHOST_MAX_PRINT_BUFF), \
"%02hhx ", pkt_addr[index]); \
--
1.7.9.5
next prev parent reply other threads:[~2015-02-20 13:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 8:50 [dpdk-dev] [PATCH] Minor C++11 compilation fix for rte_pci.h Stefan Puiu
2015-02-13 8:25 ` Mcnamara, John
2015-02-13 10:17 ` Bruce Richardson
2015-02-13 10:27 ` Mcnamara, John
2015-02-20 12:26 ` Stefan Puiu
2015-02-20 13:18 ` [dpdk-dev] [PATCH 1/2] rte_pci.h: Fix C++11 compilation Stefan Puiu
2015-02-20 13:23 ` Stefan Puiu
2015-02-20 13:23 ` Stefan Puiu [this message]
2015-02-24 1:49 ` [dpdk-dev] [PATCH 2/2] Headers: more C++11 compilation fixes Thomas Monjalon
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=1424438606-1130-2-git-send-email-stefan.puiu@gmail.com \
--to=stefan.puiu@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).