From: Govindarajulu Varadarajan
Date: Sun, 18 Jun 2017 22:05:37 -0700
> With -Wformat-truncation=, gcc throws the following warning. Instead of
> using snprintf, use kasprintf and allocate string size as needed.
>
> drivers/net/ethernet/cisco/enic/enic_main.c: In function ‘enic_open’:
> drivers/
On Sun, 18 Jun 2017, Joe Perches wrote:
Perhaps it'd be better to use a style
with a variable length format precision
ie:
"%.*s-tx-%u", IFNAMSIZ - 4 - , netdev-name, i)
This would truncate interface name. Why is this preferred to my patch?
On Sun, 2017-06-18 at 22:55 -0700, Govindarajulu Varadarajan wrote:
> On Sun, 18 Jun 2017, Joe Perches wrote:
>
> > Perhaps it'd be better to use a style
> > with a variable length format precision
> >
> > ie:
> >
> > "%.*s-tx-%u", IFNAMSIZ - 4 - , netdev-name, i)
> >
>
> This would trunca
On Sun, 2017-06-18 at 22:05 -0700, Govindarajulu Varadarajan wrote:
> With -Wformat-truncation=, gcc throws the following warning. Instead of
> using snprintf, use kasprintf and allocate string size as needed.
>
> drivers/net/ethernet/cisco/enic/enic_main.c: In function ‘enic_open’:
> drivers/net/
With -Wformat-truncation=, gcc throws the following warning. Instead of
using snprintf, use kasprintf and allocate string size as needed.
drivers/net/ethernet/cisco/enic/enic_main.c: In function ‘enic_open’:
drivers/net/ethernet/cisco/enic/enic_main.c:1740:15: warning: ‘%u’ directive
output may b