Re: [PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-06 Thread Andrea Claudi
On Thu, Sep 5, 2019 at 5:51 PM Stephen Hemminger wrote: > > On Thu, 5 Sep 2019 13:44:55 +0200 > Andrea Claudi wrote: > > > On Thu, Sep 5, 2019 at 12:15 AM David Ahern wrote: > > > > > > On 9/4/19 9:50 AM, Andrea Claudi wrote: > > > > gcc v9.2.1 produces the following warning compiling iproute2:

Re: [PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-05 Thread Stephen Hemminger
On Thu, 5 Sep 2019 13:44:55 +0200 Andrea Claudi wrote: > On Thu, Sep 5, 2019 at 12:15 AM David Ahern wrote: > > > > On 9/4/19 9:50 AM, Andrea Claudi wrote: > > > gcc v9.2.1 produces the following warning compiling iproute2: > > > > > > bpf.c: In function ‘bpf_get_work_dir’: > > > bpf.c:784:49:

Re: [PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-05 Thread Andrea Claudi
On Thu, Sep 5, 2019 at 12:15 AM David Ahern wrote: > > On 9/4/19 9:50 AM, Andrea Claudi wrote: > > gcc v9.2.1 produces the following warning compiling iproute2: > > > > bpf.c: In function ‘bpf_get_work_dir’: > > bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last > > format

Re: [PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-04 Thread David Ahern
On 9/4/19 9:50 AM, Andrea Claudi wrote: > gcc v9.2.1 produces the following warning compiling iproute2: > > bpf.c: In function ‘bpf_get_work_dir’: > bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last > format character [-Wformat-truncation=] > 784 | snprintf(bpf_wrk_dir,

Re: [PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-04 Thread Andrea Claudi
On Wed, Sep 4, 2019 at 5:50 PM Andrea Claudi wrote: > > gcc v9.2.1 produces the following warning compiling iproute2: > > bpf.c: In function ‘bpf_get_work_dir’: > bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last > format character [-Wformat-truncation=] > 784 | snprint

[PATCH iproute2-next] bpf: fix snprintf truncation warning

2019-09-04 Thread Andrea Claudi
gcc v9.2.1 produces the following warning compiling iproute2: bpf.c: In function ‘bpf_get_work_dir’: bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] 784 | snprintf(bpf_wrk_dir, sizeof(bpf_wrk_dir), "%s/", mnt); |