Re: [PATCH nft] mnl: silence compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 20, 2025 at 02:44:43PM +0200, Florian Westphal wrote:
> gcc 14.3.0 reports this:
> 
> src/mnl.c: In function 'mnl_nft_chain_add':
> src/mnl.c:916:25: warning: 'nest' may be used uninitialized [-Wmaybe-uninitialized]
>   916 |                         mnl_attr_nest_end(nlh, nest);
> 
> I guess its because compiler can't know that the conditions cannot change
> in-between and assumes nest_end() can be called without nest_start().
> 
> Fixes: 01277922fede ("src: ensure chain policy evaluation when specified")
> Signed-off-by: Florian Westphal <fw@xxxxxxxxx>

Thanks for this fix.

Reviewed-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux