Re: linux-next: build warning after merge of the vfs-brauner tree

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

 



On Tue, 5 Mar 2024 at 15:51, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> fs/coredump.c: In function 'dump_user_range':
> fs/coredump.c:923:40: warning: left-hand operand of comma expression has no effect [-Wunused-value]
>   923 | #define dump_page_copy(src, dst) ((dst), (src))
>       |                                        ^
> fs/coredump.c:948:58: note: in expansion of macro 'dump_page_copy'
>   948 |                         int stop = !dump_emit_page(cprm, dump_page_copy(page, dump_page));
>       |                                                          ^~~~~~~~~~~~~~
>
> Introduced by commit
>
>   4630f2caafcd ("coredump: get machine check errors early rather than during iov_iter")

Bah. If comes from that

  #define dump_page_copy(src,dst) ((dst),(src))

and I did it that way because I wanted to avoid *another* warning,
namely the "dst not used" thing.

But it would have probably been better to either make it an inline
function, or maybe an explicit cast, eg

  #define dump_page_copy(src,dst) ((void)(dst),(src))

or whatever.

                   Linus




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux