[PATCH v2 bpf-next 03/17] libbpf: suppress compiler warning when using SEC() macro with externs

2021-04-16 Thread Andrii Nakryiko
When used on externs SEC() macro will trigger compilation warning about inapplicable `__attribute__((used))`. That's expected for extern declarations, so suppress it with the corresponding _Pragma. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf_helpers.h | 11 +-- 1 file changed, 9

[PATCH bpf-next 03/17] libbpf: suppress compiler warning when using SEC() macro with externs

2021-04-14 Thread Andrii Nakryiko
When used on externs SEC() macro will trigger compilation warning about inapplicable `__attribute__((used))`. That's expected for extern declarations, so suppress it with the corresponding _Pragma. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/bpf_helpers.h | 11 +-- 1 file changed, 9

Re: [PATCH bpf-next] selftests/bpf: fix compiler warning in BPF_KPROBE definition in loop6.c

2021-03-08 Thread Yonghong Song
On 3/8/21 8:43 PM, Andrii Nakryiko wrote: Add missing return type to BPF_KPROBE definition. Without it, compiler generates the following warning: progs/loop6.c:68:12: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] BPF_KPROBE(trace_virtqueue_add_sgs, void *unused, struct

[PATCH bpf-next] selftests/bpf: fix compiler warning in BPF_KPROBE definition in loop6.c

2021-03-08 Thread Andrii Nakryiko
Add missing return type to BPF_KPROBE definition. Without it, compiler generates the following warning: progs/loop6.c:68:12: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] BPF_KPROBE(trace_virtqueue_add_sgs, void *unused, struct scatterlist **sgs, ^ 1 warning gener

Re: [PATCH 4/5] misc: fix compiler warning in ifstat and nstat

2020-11-30 Thread Stephen Hemminger
On Mon, 30 Nov 2020 09:18:59 + David Laight wrote: > From: Stephen Hemminger > > Sent: 30 November 2020 00:22 > > > > The code here was doing strncpy() in a way that causes gcc 10 > > warning about possible string overflow. Just use strlcpy() which > > will null terminate and bound the strin

RE: [PATCH 4/5] misc: fix compiler warning in ifstat and nstat

2020-11-30 Thread David Laight
From: Stephen Hemminger > Sent: 30 November 2020 00:22 > > The code here was doing strncpy() in a way that causes gcc 10 > warning about possible string overflow. Just use strlcpy() which > will null terminate and bound the string as expected. > > This has existed since start of git era so no Fix

[PATCH 5/5] f_u32: fix compiler gcc-10 compiler warning

2020-11-29 Thread Stephen Hemminger
With gcc-10 it complains about array subscript error. f_u32.c: In function ‘u32_parse_opt’: f_u32.c:1113:24: warning: array subscript 0 is outside the bounds of an interior zero-length array ‘struct tc_u32_key[0]’ [-Wzero-length-bounds] 1113 |hash = sel2.sel.keys[0].val & sel2.sel.keys[0].ma

[PATCH 4/5] misc: fix compiler warning in ifstat and nstat

2020-11-29 Thread Stephen Hemminger
The code here was doing strncpy() in a way that causes gcc 10 warning about possible string overflow. Just use strlcpy() which will null terminate and bound the string as expected. This has existed since start of git era so no Fixes tag. Signed-off-by: Stephen Hemminger --- misc/ifstat.c | 2 +-

Re: [PATCH bpf-next 1/7] libbpf: disable -Wswitch-enum compiler warning

2020-08-18 Thread Yonghong Song
On 8/18/20 6:39 PM, Andrii Nakryiko wrote: On Tue, Aug 18, 2020 at 6:23 PM Yonghong Song wrote: On 8/18/20 2:33 PM, Andrii Nakryiko wrote: That compilation warning is more annoying, than helpful. Curious which compiler and which version caused this issue? I did not hit with gcc 8.2 or

Re: [PATCH bpf-next 1/7] libbpf: disable -Wswitch-enum compiler warning

2020-08-18 Thread Andrii Nakryiko
On Tue, Aug 18, 2020 at 6:23 PM Yonghong Song wrote: > > > > On 8/18/20 2:33 PM, Andrii Nakryiko wrote: > > That compilation warning is more annoying, than helpful. > > Curious which compiler and which version caused this issue? > I did not hit with gcc 8.2 or latest clang in my environment. > St

Re: [PATCH bpf-next 1/7] libbpf: disable -Wswitch-enum compiler warning

2020-08-18 Thread Yonghong Song
On 8/18/20 2:33 PM, Andrii Nakryiko wrote: That compilation warning is more annoying, than helpful. Curious which compiler and which version caused this issue? I did not hit with gcc 8.2 or latest clang in my environment. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/Makefile | 2 +-

[PATCH bpf-next 1/7] libbpf: disable -Wswitch-enum compiler warning

2020-08-18 Thread Andrii Nakryiko
That compilation warning is more annoying, than helpful. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index bf8ed134cb8a..95c946e94ca5 100644 --- a/tools/lib/bpf/Makef

[RFC PATCH bpf-next 1/7] libbpf: disable -Wswitch-enum compiler warning

2020-08-07 Thread Andrii Nakryiko
That compilation warning is more annoying, than helpful. Signed-off-by: Andrii Nakryiko --- tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index bf8ed134cb8a..95c946e94ca5 100644 --- a/tools/lib/bpf/Makef

RE: [PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread John Fastabend
Muchun Song wrote: > Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. > > kernel/kprobes.c: In function 'kill_kprobe': > kernel/kprobes.c:1116:33: warning: statement with no effect > [-Wunused-value] > 1116 | #define disa

Re: [PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread Masami Hiramatsu
On Thu, 6 Aug 2020 01:20:46 +0800 Muchun Song wrote: > Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. > > kernel/kprobes.c: In function 'kill_kprobe': > kernel/kprobes.c:1116:33: warning: statement with no effect > [-Wunused-value] > 1116 | #d

[PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread Muchun Song
Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. kernel/kprobes.c: In function 'kill_kprobe': kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value] 1116 | #define disarm_kprobe_ftrace(p) (-ENODEV) | ^ kernel

Re: [PATCH iptables] libxtables/xtables.c - compiler warning fixes for NO_SHARED_LIBS

2020-07-03 Thread Pablo Neira Ayuso
On Tue, Jun 23, 2020 at 04:09:02PM -0700, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > Fixes two issues with NO_SHARED_LIBS: > - #include is ifdef'ed out and thus dlclose() >triggers an undeclared function compiler warning > - dlreg_add() is unus

Re: [PATCH iptables] libxtables/xtables.c - compiler warning fixes for NO_SHARED_LIBS

2020-06-23 Thread Maciej Żenczykowski
> void xtables_fini(void) > { > +#ifndef NO_SHARED_LIBS > dlreg_free(); > +#endif > } Note: I also considered just adding an empty 'void dlreg_free(void) {}' function in the NO_SHARED_LIBS case, but that doesn't seem to be the prevalent style...

[PATCH iptables] libxtables/xtables.c - compiler warning fixes for NO_SHARED_LIBS

2020-06-23 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Fixes two issues with NO_SHARED_LIBS: - #include is ifdef'ed out and thus dlclose() triggers an undeclared function compiler warning - dlreg_add() is unused and thus triggers an unused function warning Test: builds without warnings Signed-off-by: M

Re: [PATCH] libiptc.c: pragma disable a gcc compiler warning

2020-05-14 Thread Pablo Neira Ayuso
On Mon, May 11, 2020 at 02:34:04PM -0700, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > Fixes: > In file included from libip4tc.c:113: > In function ‘iptcc_compile_chain’, > inlined from ‘iptcc_compile_table’ at libiptc.c:1246:13, > inlined from ‘iptc_commit’ at libip

[PATCH] libiptc.c: pragma disable a gcc compiler warning

2020-05-11 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Fixes: In file included from libip4tc.c:113: In function ‘iptcc_compile_chain’, inlined from ‘iptcc_compile_table’ at libiptc.c:1246:13, inlined from ‘iptc_commit’ at libiptc.c:2575:8, inlined from ‘iptc_commit’ at libiptc.c:2513:1: libiptc.c:1172

Bunch of compiler warning fixes for ethtool.

2019-10-16 Thread Maciej Żenczykowski
You can merge them via: git fetch https://github.com/zenczykowski/ethtool.git fix-warnings git merge FETCH_HEAD and I'll follow up this email with the full set.

Re: [PATCH bpf-next] bpf: fix compiler warning with CONFIG_MODULES=n

2019-06-26 Thread Daniel Borkmann
On 06/26/2019 02:35 AM, Yonghong Song wrote: > With CONFIG_MODULES=n, the following compiler warning occurs: > /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: > ‘do_bpf_send_signal’ defined but not used [-Wunused-function] > static void do_bpf_send_s

Re: [PATCH bpf-next] bpf: fix compiler warning with CONFIG_MODULES=n

2019-06-25 Thread Song Liu
> On Jun 25, 2019, at 5:35 PM, Yonghong Song wrote: > > With CONFIG_MODULES=n, the following compiler warning occurs: > /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: > ‘do_bpf_send_signal’ defined but not used [-Wunused-function]

[PATCH bpf-next] bpf: fix compiler warning with CONFIG_MODULES=n

2019-06-25 Thread Yonghong Song
With CONFIG_MODULES=n, the following compiler warning occurs: /data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning: ‘do_bpf_send_signal’ defined but not used [-Wunused-function] static void do_bpf_send_signal(struct irq_work *entry) The __init function

Re: [PATCH bpf v2] selftests: bpf: fix compiler warning

2019-05-29 Thread Daniel Borkmann
On 05/28/2019 09:02 PM, Alakesh Haloi wrote: > Add missing header file following compiler warning > > prog_tests/flow_dissector.c: In function ‘tx_tap’: > prog_tests/flow_dissector.c:175:9: warning: implicit declaration of function > ‘writev’; did you mean ‘write’? [-Wim

Re: [PATCH bpf-next] samples/bpf: silence compiler warning for xdpsock_user.c

2019-03-01 Thread Daniel Borkmann
hether &idx_fq is assigned > or not inside the library function xsk_ring_prod__reserve(). > > Let us assign an initial value 0 to such auto variables to silence > compiler warning. > > Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP > access") > Signed-off-by: Yonghong Song Applied, thanks!

Re: [PATCH bpf-next] samples/bpf: silence compiler warning for xdpsock_user.c

2019-03-01 Thread Song Liu
xsk_ring_prod__reserve(&xsk->umem->fq, rcvd, &idx_fq); > > if (ret) { > > ... > > } > > ... idx_fq ... > > The compiler warns since it does not know whether &idx_fq is assigned > > or not inside the library function xsk_ring_p

Re: [PATCH bpf-next] samples/bpf: silence compiler warning for xdpsock_user.c

2019-03-01 Thread Jonathan Lemon
auto variables to silence compiler warning. Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access") Signed-off-by: Yonghong Song --- samples/bpf/xdpsock_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c

[PATCH bpf-next] samples/bpf: silence compiler warning for xdpsock_user.c

2019-02-28 Thread Yonghong Song
d, &idx_fq); if (ret) { ... } ... idx_fq ... The compiler warns since it does not know whether &idx_fq is assigned or not inside the library function xsk_ring_prod__reserve(). Let us assign an initial value 0 to such auto variables to silence compiler warning. Fixes: 248c

Re: Compiler warning

2019-02-07 Thread Koen Vandeputte
On 05.02.19 03:55, David Ahern wrote: On 2/4/19 3:43 AM, Koen Vandeputte wrote: Hi All, I'm seeing following compiler warning during kernel compilation (5.0-rc5  and  4.14.96): net/core/dev.c: In function 'validate_xmit_skb_list': net/core/dev.c:3405:15: warning: &#x

Re: Compiler warning

2019-02-04 Thread David Ahern
On 2/4/19 3:43 AM, Koen Vandeputte wrote: > Hi All, > > I'm seeing following compiler warning during kernel compilation > (5.0-rc5  and  4.14.96): > > > net/core/dev.c: In function 'validate_xmit_skb_list': > net/core/dev.c:3405:15: warning: 'tail&#

Re: Compiler warning - ipv4 fib_trie

2019-02-04 Thread David Ahern
On 2/4/19 3:55 AM, Koen Vandeputte wrote: > Hi All, > > During compilation of kernel 4.14.96 and 5.0-rc5 I'm seeing following > warning: > > net/ipv4/fib_trie.c: In function 'fib_trie_unmerge': > net/ipv4/fib_trie.c:1749:8: warning: 'local_tp' may be used > uninitialized in this function [-Wmaybe

Compiler warning - ipv4 fib_trie

2019-02-04 Thread Koen Vandeputte
Hi All, During compilation of kernel 4.14.96 and 5.0-rc5 I'm seeing following warning: net/ipv4/fib_trie.c: In function 'fib_trie_unmerge': net/ipv4/fib_trie.c:1749:8: warning: 'local_tp' may be used uninitialized in this function [-Wmaybe-uninitialized]     if (fib_insert_alias(lt, local_tp

Compiler warning

2019-02-04 Thread Koen Vandeputte
Hi All, I'm seeing following compiler warning during kernel compilation (5.0-rc5  and  4.14.96): net/core/dev.c: In function 'validate_xmit_skb_list': net/core/dev.c:3405:15: warning: 'tail' may be used uninitialized in this function [-Wmaybe-uninitializ

Re: [PATCH bpf-next v2] bpf: fix a (false) compiler warning

2019-01-17 Thread Daniel Borkmann
On 01/16/2019 07:43 PM, Peter Oskolkov wrote: > An older GCC compiler complains: > > kernel/bpf/verifier.c: In function 'bpf_check': > kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized > in this function [-Werror=maybe-uninitialized] >} else if (krecord[i].ins

Re: [PATCH bpf-next v2] bpf: fix a (false) compiler warning

2019-01-16 Thread Martin Lau
On Wed, Jan 16, 2019 at 10:43:01AM -0800, Peter Oskolkov wrote: > An older GCC compiler complains: > > kernel/bpf/verifier.c: In function 'bpf_check': > kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized > in this function [-Werror=maybe-uninitialized] >} else

[PATCH bpf-next v2] bpf: fix a (false) compiler warning

2019-01-16 Thread Peter Oskolkov
An older GCC compiler complains: kernel/bpf/verifier.c: In function 'bpf_check': kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] } else if (krecord[i].insn_offset <= prev_offset) { ^ kernel/bpf/verif

Re: [PATCH bpf-next] bpf: fix a (false) compiler warning

2019-01-16 Thread Martin Lau
On Wed, Jan 16, 2019 at 08:44:32AM -0800, Peter Oskolkov wrote: > An older GCC compiler complains: > > kernel/bpf/verifier.c: In function 'bpf_check': > kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized > in this function [-Werror=maybe-uninitialized] >} else

[PATCH bpf-next] bpf: fix a (false) compiler warning

2019-01-16 Thread Peter Oskolkov
An older GCC compiler complains: kernel/bpf/verifier.c: In function 'bpf_check': kernel/bpf/verifier.c:4***:13: error: 'prev_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized] } else if (krecord[i].insn_offset <= prev_offset) { ^ kernel/bpf/verif

[PATCH bpf-next v2 1/2] i40e: fix possible compiler warning in xsk TX path

2018-08-31 Thread Magnus Karlsson
With certain gcc versions, it was possible to get the warning "'tx_desc' may be used uninitialized in this function" for the i40e_xmit_zc. This was not possible, however this commit simplifies the code path so that this warning is no longer emitted. Signed-off-by: Magnus Karlsson --- drivers/net

[PATCH bpf-next 1/3] i40e: fix possible compiler warning in xsk TX path

2018-08-30 Thread Magnus Karlsson
With certain gcc versions, it was possible to get the warning "'tx_desc' may be used uninitialized in this function" for the i40e_xmit_zc. This was not possible, however this commit simplifies the code path so that this warning is no longer emitted. Signed-off-by: Magnus Karlsson --- drivers/net

[PATCH v2 2/2] staging: rtl8712u: Fix compiler warning about strncpy

2018-08-27 Thread Larry Finger
When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. Using strlcpy() rather than strncpy() forces a null at the end and quiets the warning. Signed-off-by: Larry Finger --- v2 - No changes. --- drivers/staging/rtl8712/

[PATCH v2 1/2] staging: rtl8192e: Fix compiler warning from strncpy()

2018-08-27 Thread Larry Finger
When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. This section is completely reworked to use the known lengths of the strings. Signed-off-by: Larry Finger --- v2 - David Laight's comments are implemented. --- driv

[Patch net] net_sched: fix a compiler warning for tcf_exts_for_each_action()

2018-08-22 Thread Cong Wang
When CONFIG_NET_CLS_ACT=n, tcf_exts_for_each_action() is a nop, which leaves its parameters unused. Shut up the compiler warning by casting them to void. Fixes: 244cd96adb5f ("net_sched: remove list_head from tc_action") Reported-by: Stephen Rothwell Signed-off-by: Cong Wang --- i

RE: [PATCH 1/2] staging: rtl8192e: Fix compiler warning about strncpy

2018-08-21 Thread David Laight
From: Larry Finger > Sent: 20 August 2018 18:51 > When strncpy() is called with source and destination strings the same > length, gcc 8 warns that there may be an unterminated string. Using > strlcpy() rather than strncpy() forces a null at the end and quiets the > warning. > > Signed-off-by: Larr

[PATCH 2/2] staging: rtl8712u: Fix compiler warning about strncpy

2018-08-20 Thread Larry Finger
When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. Using strlcpy() rather than strncpy() forces a null at the end and quiets the warning. Signed-off-by: Larry Finger --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c

[PATCH 1/2] staging: rtl8192e: Fix compiler warning about strncpy

2018-08-20 Thread Larry Finger
When strncpy() is called with source and destination strings the same length, gcc 8 warns that there may be an unterminated string. Using strlcpy() rather than strncpy() forces a null at the end and quiets the warning. Signed-off-by: Larry Finger --- drivers/staging/rtl8192e/rtllib_softmac.c | 4

Re: [PATCH net] sctp: avoid compiler warning on implicit fallthru

2018-01-15 Thread David Miller
From: Marcelo Ricardo Leitner Date: Thu, 11 Jan 2018 14:22:06 -0200 > These fall-through are expected. > > Signed-off-by: Marcelo Ricardo Leitner Applied, thank you.

Re: [PATCH net] sctp: avoid compiler warning on implicit fallthru

2018-01-12 Thread Xin Long
On Fri, Jan 12, 2018 at 12:22 AM, Marcelo Ricardo Leitner wrote: > These fall-through are expected. > > Signed-off-by: Marcelo Ricardo Leitner > --- > net/sctp/ipv6.c | 1 + > net/sctp/outqueue.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/net/sctp/ipv6.c b/

Re: [PATCH net] sctp: avoid compiler warning on implicit fallthru

2018-01-12 Thread Neil Horman
On Thu, Jan 11, 2018 at 02:22:06PM -0200, Marcelo Ricardo Leitner wrote: > These fall-through are expected. > > Signed-off-by: Marcelo Ricardo Leitner > --- > net/sctp/ipv6.c | 1 + > net/sctp/outqueue.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/net/sctp/

[PATCH net] sctp: avoid compiler warning on implicit fallthru

2018-01-11 Thread Marcelo Ricardo Leitner
These fall-through are expected. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/ipv6.c | 1 + net/sctp/outqueue.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 3b18085e3b10253f3f81be7a6747b50ef9357db2..5d4c15bf66d262194

[iproute PATCH 2/2] tc_util: Silence spurious compiler warning

2017-11-15 Thread Phil Sutter
GCC version 7.2.1 complains that 'result1' may be used uninitialized in parse_action_control_slash_spaces(). This should not be possible in practice, so the actual value 'result1' is initialized with does not matter. Signed-off-by: Phil Sutter --- tc/tc_util.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH net-next] bpf: Fix compiler warning on info.map_ids for 32bit platform

2017-09-30 Thread David Miller
From: Martin KaFai Lau Date: Fri, 29 Sep 2017 10:52:17 -0700 > This patch uses u64_to_user_ptr() to cast info.map_ids to a userspace ptr. > It also tags the user_map_ids with '__user' for sparse check. > > Fixes: cb4d2b3f03d8 ("bpf: Add name, load_time, uid and map_ids to > bpf_prog_info") > Si

Re: [PATCH net-next] bpf: Fix compiler warning on info.map_ids for 32bit platform

2017-09-30 Thread Daniel Borkmann
On 09/29/2017 07:52 PM, Martin KaFai Lau wrote: This patch uses u64_to_user_ptr() to cast info.map_ids to a userspace ptr. It also tags the user_map_ids with '__user' for sparse check. Fixes: cb4d2b3f03d8 ("bpf: Add name, load_time, uid and map_ids to bpf_prog_info") Signed-off-by: Martin KaFai

[PATCH net-next] bpf: Fix compiler warning on info.map_ids for 32bit platform

2017-09-29 Thread Martin KaFai Lau
This patch uses u64_to_user_ptr() to cast info.map_ids to a userspace ptr. It also tags the user_map_ids with '__user' for sparse check. Fixes: cb4d2b3f03d8 ("bpf: Add name, load_time, uid and map_ids to bpf_prog_info") Signed-off-by: Martin KaFai Lau --- kernel/bpf/syscall.c | 2 +- 1 file cha

Re: [PATCH] arp: fixed -Wuninitialized compiler warning

2017-05-25 Thread David Miller
From: Ihar Hrachyshka Date: Wed, 24 May 2017 15:19:35 -0700 > Commit 7d472a59c0e5ec117220a05de6b370447fb6cb66 ("arp: always override > existing neigh entries with gratuitous ARP") introduced a compiler > warning: > > net/ipv4/arp.c:880:35: warning: 'addr_type

[PATCH] arp: fixed -Wuninitialized compiler warning

2017-05-24 Thread Ihar Hrachyshka
Commit 7d472a59c0e5ec117220a05de6b370447fb6cb66 ("arp: always override existing neigh entries with gratuitous ARP") introduced a compiler warning: net/ipv4/arp.c:880:35: warning: 'addr_type' may be used uninitialized in this function [-Wmaybe-uninitialized] While the co

[PATCH 2/2] sunbmac: Fix compiler warning

2016-10-14 Thread Tushar Dave
le pointer type ./include/linux/dma-mapping.h:445: note: expected ‘dma_addr_t *’ but argument is of type ‘__u32 *’ This patch resolves above compiler warning. Signed-off-by: Tushar Dave Reviewed-by: chris hyser --- drivers/net/ethernet/sun/sunbmac.c | 5 +++-- drivers/net/ethernet/sun/s

Re: [PATCH] net: ti: cpmac: Fix compiler warning due to type confusion

2016-09-04 Thread David Miller
From: Paul Burton Date: Fri, 2 Sep 2016 15:22:48 +0100 > cpmac_start_xmit() used the max() macro on skb->len (an unsigned int) > and ETH_ZLEN (a signed int literal). This led to the following compiler > warning: > > In file included from include/linux/list.h:8:0, >

[PATCH] net: ti: cpmac: Fix compiler warning due to type confusion

2016-09-02 Thread Paul Burton
cpmac_start_xmit() used the max() macro on skb->len (an unsigned int) and ETH_ZLEN (a signed int literal). This led to the following compiler warning: In file included from include/linux/list.h:8:0, from include/linux/module.h:9, from drivers/net/ether

Re: [net-next 12/15] i40evf: fix compiler warning of unused variable

2015-11-26 Thread Sergei Shtylyov
Hello. On 11/23/2015 10:36 PM, Jeff Kirsher wrote: From: Jesse Brandeburg Compiler complained of an unused variable, which the driver was just using to store the result of a rd32 which is used to clear a register unconditionally. Just drop the unused variable and re-use one. I don't see

[net-next 12/15] i40evf: fix compiler warning of unused variable

2015-11-23 Thread Jeff Kirsher
From: Jesse Brandeburg Compiler complained of an unused variable, which the driver was just using to store the result of a rd32 which is used to clear a register unconditionally. Just drop the unused variable and re-use one. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-

Re: [PATCH] vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

2015-09-06 Thread David Miller
From: Geert Uytterhoeven Date: Fri, 4 Sep 2015 12:49:32 +0200 > drivers/net/vxlan.c: In function ‘vxlan_udp_encap_recv’: > drivers/net/vxlan.c:1226: warning: ‘info’ may be used uninitialized in this > function > > While this warning is a false positive, it can be killed easily by > getting rid

Re: [PATCH] vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

2015-09-04 Thread Thomas Graf
On 09/04/15 at 12:49pm, Geert Uytterhoeven wrote: > drivers/net/vxlan.c: In function ‘vxlan_udp_encap_recv’: > drivers/net/vxlan.c:1226: warning: ‘info’ may be used uninitialized in this > function > > While this warning is a false positive, it can be killed easily by > getting rid of the pointer

Re: [PATCH] vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

2015-09-04 Thread Jiri Benc
On Fri, 4 Sep 2015 12:49:32 +0200, Geert Uytterhoeven wrote: > drivers/net/vxlan.c: In function ‘vxlan_udp_encap_recv’: > drivers/net/vxlan.c:1226: warning: ‘info’ may be used uninitialized in this > function > > While this warning is a false positive, it can be killed easily by > getting rid of

[PATCH] vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

2015-09-04 Thread Geert Uytterhoeven
drivers/net/vxlan.c: In function ‘vxlan_udp_encap_recv’: drivers/net/vxlan.c:1226: warning: ‘info’ may be used uninitialized in this function While this warning is a false positive, it can be killed easily by getting rid of the pointer intermediary and referring directly to the ip_tunnel_info str

Re: [PATCH 3.14] net: sysctl_net_core: remove compiler warning about unused variable 'one'

2015-08-11 Thread Dirk Behme
On 11.08.2015 14:42, Vladimir Zapolskiy wrote: From: Dirk Behme Remove the compiler warning net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable] static int one = 1; introduced by the 3.14.37 stable commit a1d55b36de6bf2 ("net:

[PATCH 3.14] net: sysctl_net_core: remove compiler warning about unused variable 'one'

2015-08-11 Thread Vladimir Zapolskiy
From: Dirk Behme Remove the compiler warning net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable] static int one = 1; introduced by the 3.14.37 stable commit a1d55b36de6bf2 ("net: sysctl_net_core: check SNDBUF and RCVBUF for min leng

[PATCH] net: rfkill-regulator: fix compiler warning

2015-07-28 Thread Robert ABEL
pdata char* name => const char* name Signed-off-by: Robert ABEL --- include/linux/rfkill-regulator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rfkill-regulator.h b/include/linux/rfkill-regulator.h index aca36bc..594d8e7 100644 --- a/include/linux/rfkill-re

[PATCH] sfc: Fix memcpy() with const destination compiler warning.

2015-04-17 Thread David Miller
drivers/net/ethernet/sfc/selftest.c: In function ‘efx_iterate_state’: drivers/net/ethernet/sfc/selftest.c:388:9: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers] This is because the msg[] member of struct efx_loopback_pay

Re: [PATCH][IPVS] Fix compiler warning about unused register_ip_vs_protocol

2007-11-20 Thread David Miller
From: Simon Horman <[EMAIL PROTECTED]> Date: Wed, 21 Nov 2007 10:38:02 +0900 > On Tue, Nov 20, 2007 at 03:08:42PM +0300, Pavel Emelyanov wrote: > > This is silly, but I have turned the CONFIG_IP_VS to m, > > to check the compilation of one (recently sent) fix > > and set all the CONFIG_IP_VS_PROTO

Re: [PATCH][IPVS] Fix compiler warning about unused register_ip_vs_protocol

2007-11-20 Thread Simon Horman
On Tue, Nov 20, 2007 at 03:08:42PM +0300, Pavel Emelyanov wrote: > This is silly, but I have turned the CONFIG_IP_VS to m, > to check the compilation of one (recently sent) fix > and set all the CONFIG_IP_VS_PROTO_XXX options to n to > speed up the compilation. > > In this configuration the compil

[PATCH][IPVS] Fix compiler warning about unused register_ip_vs_protocol

2007-11-20 Thread Pavel Emelyanov
This is silly, but I have turned the CONFIG_IP_VS to m, to check the compilation of one (recently sent) fix and set all the CONFIG_IP_VS_PROTO_XXX options to n to speed up the compilation. In this configuration the compiler warns me about CC [M] net/ipv4/ipvs/ip_vs_proto.o net/ipv4/ipvs/ip_vs_

[PATCH] s2io: Fix a compiler warning in a printk()

2005-07-13 Thread Michael Ellerman
Fix a compile warning in the s2io driver. It's caused because u64 is unsigned long on PPC64 not unsigned long long. Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]> --- Index: work/drivers/net/s2io.c === --- work.orig/drivers/net/