Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op

Andy Shevchenko
2026-02-04T16:46:36Z

On Wed, Feb 04, 2026 at 10:41:23AM +0100, Andy Shevchenko wrote:
> Clang compiler is not happy about set but unused variables:
>
> .../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
> .../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
> .../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
>
> Fix these by forwarding parameters of dprintk() to no_printk().
> The positive side-effect is a format-string checker enabled even for the cases
> when dprintk() is no-op.

I'm afraid this is not end of story...
I received a dozen of minutes ago a new report and now I'm investigating.

Patches 1 & 2 though are ready to go.

--
With Best Regards,
Andy Shevchenko