lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Mar 2020 17:48:06 +0100
From:   Stefano Garzarella <sgarzare@...hat.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     axboe@...nel.dk, viro@...iv.linux.org.uk, io-uring@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] io_uring: Fix unused function warnings

On Wed, Mar 04, 2020 at 03:53:52PM +0800, YueHaibing wrote:
> If CONFIG_NET is not set, gcc warns:
> 
> fs/io_uring.c:3110:12: warning: io_setup_async_msg defined but not used [-Wunused-function]
>  static int io_setup_async_msg(struct io_kiocb *req,
>             ^~~~~~~~~~~~~~~~~~
> 
> There are many funcions wraped by CONFIG_NET, move them
> together to simplify code, also fix this warning.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  fs/io_uring.c | 98 ++++++++++++++++++++++++++++++++++-------------------------
>  1 file changed, 57 insertions(+), 41 deletions(-)
> 

Since the code under the ifdef/else/endif blocks now are huge, would it make
sense to add some comments for better readability?

I mean something like this:

#if defined(CONFIG_NET)
...
#else /* !CONFIG_NET */
...
#endif /* CONFIG_NET */


Thanks,
Stefano

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ