Re: [PATCH] netfilter: nf_osf: avoid passing pointer to local var

2020-04-29 Thread Pablo Neira Ayuso
On Wed, Apr 29, 2020 at 09:00:41PM +0200, Arnd Bergmann wrote: > gcc-10 points out that a code path exists where a pointer to a stack > variable may be passed back to the caller: > > net/netfilter/nfnetlink_osf.c: In function 'nf_osf_hdr_ctx_init': > cc1: warning: function may return address of

Re: [PATCH] netfilter: nf_osf: avoid passing pointer to local var

2020-04-29 Thread Florian Westphal
Arnd Bergmann wrote: > gcc-10 points out that a code path exists where a pointer to a stack > variable may be passed back to the caller: > > net/netfilter/nfnetlink_osf.c: In function 'nf_osf_hdr_ctx_init': > cc1: warning: function may return address of local variable > [-Wreturn-local-addr] >

[PATCH] netfilter: nf_osf: avoid passing pointer to local var

2020-04-29 Thread Arnd Bergmann
gcc-10 points out that a code path exists where a pointer to a stack variable may be passed back to the caller: net/netfilter/nfnetlink_osf.c: In function 'nf_osf_hdr_ctx_init': cc1: warning: function may return address of local variable [-Wreturn-local-addr]