diff mbox

[dpdk-dev,1/5] kni: fix build with gcc 7.1

Message ID 20170613164212.42374-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Headers show


Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit June 13, 2017, 4:42 p.m. UTC
build error:
  In function ‘igb_kni_probe’:
  error: ‘%d’ directive output may be truncated writing between 1 and 5
  bytes into a region of size between 0 and 11
        "%d.%d, 0x%08x, %d.%d.%d",
  note: directive argument in the range [0, 65535]
        "%d.%d, 0x%08x, %d.%d.%d",
  note: ‘snprintf’ output between 23 and 43 bytes into a destination of
  size 32
        "%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(-)


Thomas Monjalon June 14, 2017, 8:55 p.m. UTC | #1
Series applied, thanks
diff mbox


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;