Thread (17 messages) 17 messages, 5 authors, 2026-02-04

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-02-04 16:46:36
Also in: linux-nfs, lkml, llvm

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help