From: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 1/5] kni: fix build with gcc 7.1
Date: Tue, 13 Jun 2017 17:42:08 +0100 [thread overview]
Message-ID: <20170613164212.42374-1-ferruh.yigit@intel.com> (raw)
build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:
In function ‘igb_kni_probe’:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2483:30:
error: ‘%d’ directive output may be truncated writing between 1 and 5
bytes into a region of size between 0 and 11
[-Werror=format-truncation=]
"%d.%d, 0x%08x, %d.%d.%d",
^~
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2483:8:
note: directive argument in the range [0, 65535]
"%d.%d, 0x%08x, %d.%d.%d",
^~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2481:4:
note: ‘snprintf’ output between 23 and 43 bytes into a destination of
size 32
snprintf(adapter->fw_version,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sizeof(adapter->fw_version),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"%d.%d, 0x%08x, %d.%d.%d",
~~~~~~~~~~~~~~~~~~~~~~~~~~
fw.eep_major, fw.eep_minor, fw.etrack_id,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fw.or_major, fw.or_build, fw.or_patch);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixed by increasing buffer size to 43 as suggested in compiler log.
Fixes: b9ee370557f1 ("kni: update kernel driver ethtool baseline")
Cc: stable@dpdk.org
Reported-by: Nirmoy Das <ndas@suse.de>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Markos Chandras <mchandras@suse.de>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
index d077b49e9..8667f29ca 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
@@ -607,7 +607,7 @@ struct igb_adapter {
int int_mode;
u32 rss_queues;
u32 vmdq_pools;
- char fw_version[32];
+ char fw_version[43];
u32 wvbr;
struct igb_mac_addr *mac_table;
#ifdef CONFIG_IGB_VMDQ_NETDEV
--
2.13.0
next reply other threads:[~2017-06-13 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 16:42 Ferruh Yigit [this message]
2017-06-13 16:42 ` [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size Ferruh Yigit
2017-06-14 1:15 ` Xing, Beilei
2017-06-13 16:42 ` [dpdk-stable] [PATCH 3/5] net/enic: fix build with gcc 7.1 Ferruh Yigit
2017-06-13 16:42 ` [dpdk-stable] [PATCH 4/5] net/mlx5: " Ferruh Yigit
2017-06-14 13:24 ` Adrien Mazarguil
2017-06-13 16:42 ` [dpdk-stable] [PATCH 5/5] hash: fix icc build Ferruh Yigit
2017-06-14 20:55 ` [dpdk-stable] [dpdk-dev] [PATCH 1/5] kni: fix build with gcc 7.1 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=20170613164212.42374-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=stable@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).