[lustre-devel] linux-4.5/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c:880: wrong % specifier ?
Dilger, Andreas
andreas.dilger at intel.com
Mon Mar 14 13:07:41 PDT 2016
Previously GCC didn't care about the distinction between %d and %u, so I suspect there are a large number of such warnings that need to be repaired.
Cheers, Andreas
> On Mar 14, 2016, at 13:36, David Binderman <dcb314 at hotmail.com> wrote:
>
> Hello there,
>
> [linux-4.5/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c:880]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
>
> Source code is
>
> return sprintf(buf, "%d\n", ldlm_cancel_unused_locks_before_replay);
>
> but
>
> extern unsigned int ldlm_cancel_unused_locks_before_replay;
>
> Suggest use %u, not %d.
>
>
> Regards
>
> David Binderman
>
More information about the lustre-devel
mailing list