Subject: Re: [PATCH net-next] tools: ynl: error check scanf() in a sample

From: Simon Horman <[email-masked]>
Date: Wed, 28 Aug 2024 19:02:46 +0100

On Wed, Aug 28, 2024 at 10:36:09AM -0700, Jakub Kicinski wrote:
> Someone reported on GitHub that the YNL NIPA test is failing
> when run locally. The test builds the tools, and it hits:
> 
>   netdev.c:82:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
>   82 | scanf("%d", &ifindex);
> 
> I can't repro this on my setups but error seems clear enough.
> 
> Link: https://github.com/linux-netdev/nipa/discussions/37
> Signed-off-by: Jakub Kicinski <[email-masked]>

Thanks, I have a similar patch in my local-queue.

I was able to reproduce the problem on Ubuntu 22.04,
although not on Fedora 40 or Debian Trixie.

Reviewed-by: Simon Horman <[email-masked]>