numam-dpdk/kernel
Ferruh Yigit a36b40dd8e kni: fix build with gcc 8.1
Error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option is
enabled.

build error:
In function ‘strncpy’,
    inlined from ‘igb_get_drvinfo’ at
    kernel/linux/kni/igb_ethtool.c:814:2:
    include/linux/string.h:246:9: error: ‘__builtin_strncpy’ output
    may be truncated copying 31 bytes from a string of length 42
    [-Werror=stringop-truncation]
      return __builtin_strncpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixed by using strlcpy instead of strncpy.

adapter->fw_version size kept same because of
c369819294 ("kni: fix build with gcc 7.1")

Also next line strncpy usage replaced with strlcpy while arround.

Fixes: c369819294 ("kni: fix build with gcc 7.1")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-06-27 15:13:17 +02:00
..
freebsd build: clean up building kernel modules using meson 2018-04-17 16:09:43 +02:00
linux kni: fix build with gcc 8.1 2018-06-27 15:13:17 +02:00
Makefile move kernel modules directories 2018-03-21 23:04:21 +01:00
meson.build build: clean up building kernel modules using meson 2018-04-17 16:09:43 +02:00