[dpdk-stable] patch 'eal: declare trace buffer at top of own block' has been queued to LTS release 16.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue May 15 19:19:04 CEST 2018
Hi,
FYI, your patch has been queued to LTS release 16.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 0b6e33f4ddb3d1253a48231d02e7a4d5382fdbef Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Sat, 12 May 2018 09:59:32 +0800
Subject: [PATCH] eal: declare trace buffer at top of own block
[ upstream commit e3908132b7903dbbf45c6d073792cccc890812e0 ]
rte_dev.h:54:2:
warning: ISO C90 forbids mixed declarations and
code [-Wdeclaration-after-statement]
char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];
Fixes: b974e4a40cb5 ("ethdev: make error checking macros public")
Signed-off-by: Andy Green <andy at warmcat.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/librte_eal/common/include/rte_dev.h | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index dcf33d0e0..2ad6da86e 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -60,15 +60,18 @@ rte_pmd_debug_trace(const char *func_name, const char *fmt, ...)
va_start(ap, fmt);
- char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];
+ {
+ char buffer[vsnprintf(NULL, 0, fmt, ap) + 1];
- va_end(ap);
+ va_end(ap);
- va_start(ap, fmt);
- vsnprintf(buffer, sizeof(buffer), fmt, ap);
- va_end(ap);
+ va_start(ap, fmt);
+ vsnprintf(buffer, sizeof(buffer), fmt, ap);
+ va_end(ap);
- rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s", func_name, buffer);
+ rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s",
+ func_name, buffer);
+ }
}
/*
--
2.14.2
More information about the stable
mailing list