linux/drivers/net/ethernet/intel/e1000e
Florian Fainelli 135e724547 e1000e: Fix -Wformat-truncation warnings
Provide precision hints to snprintf() since we know the destination
buffer size of the RX/TX ring names are IFNAMSIZ + 5 - 1. This fixes the
following warnings:

drivers/net/ethernet/intel/e1000e/netdev.c: In function
'e1000_request_msix':
drivers/net/ethernet/intel/e1000e/netdev.c:2109:13: warning: 'snprintf'
output may be truncated before the last format character
[-Wformat-truncation=]
     "%s-rx-0", netdev->name);
             ^
drivers/net/ethernet/intel/e1000e/netdev.c:2107:3: note: 'snprintf'
output between 6 and 21 bytes into a destination of size 20
   snprintf(adapter->rx_ring->name,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     sizeof(adapter->rx_ring->name) - 1,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     "%s-rx-0", netdev->name);
     ~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/e1000e/netdev.c:2125:13: warning: 'snprintf'
output may be truncated before the last format character
[-Wformat-truncation=]
     "%s-tx-0", netdev->name);
             ^
drivers/net/ethernet/intel/e1000e/netdev.c:2123:3: note: 'snprintf'
output between 6 and 21 bytes into a destination of size 20
   snprintf(adapter->tx_ring->name,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     sizeof(adapter->tx_ring->name) - 1,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     "%s-tx-0", netdev->name);
     ~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-23 13:44:57 -08:00
..
80003es2lan.c e1000e: fix a missing check for return value 2019-02-05 16:08:55 -08:00
80003es2lan.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
82571.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
82571.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
defines.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
e1000.h e1000e: extend PTP gettime function to read system clock 2018-11-09 19:43:51 -08:00
ethtool.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
hw.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
ich8lan.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
ich8lan.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
mac.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
mac.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
Makefile net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
manage.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
manage.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
netdev.c e1000e: Fix -Wformat-truncation warnings 2019-02-23 13:44:57 -08:00
nvm.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
nvm.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
param.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
phy.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
phy.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
ptp.c e1000e: extend PTP gettime function to read system clock 2018-11-09 19:43:51 -08:00
regs.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00