public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: RDMA mailing list <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: librdmacm in rdma-core build warnings
Date: Mon, 2 Oct 2017 09:15:32 +0300	[thread overview]
Message-ID: <20171002061532.GJ2031@mtr-leonro.local> (raw)

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Hi All,

After moving to gcc version 7.2.0 (GCC), I started experience the
following compilation warning with default build.sh supplied with
rdma-core.

[26/189] Building C object librdmacm/CMakeFiles/rspreload.dir/preload.c.o
../librdmacm/preload.c:818:9: warning: no previous prototype for ‘readv’ [-Wmissing-prototypes]
 ssize_t readv(int socket, const struct iovec *iov, int iovcnt)
         ^~~~~
../librdmacm/preload.c:857:9: warning: no previous prototype for ‘writev’ [-Wmissing-prototypes]
 ssize_t writev(int socket, const struct iovec *iov, int iovcnt)

The code to enable -Wmissing-prototypes checks is part of the rdma-core
for a year now, see commit: b192ed2347e5 ("Enable -Wmissing-prototypes/-Wmissing-declarations")

The fact that librdmacm/preload.c uses combination of RTLD_NEXT and
dlsym to set readv/writev scares me to just delete readv and writev calls,
because it is most probably wrong.

Any ideas how to fix it?

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2017-10-02  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02  6:15 Leon Romanovsky [this message]
     [not found] ` <20171002061532.GJ2031-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-10-02 16:11   ` librdmacm in rdma-core build warnings Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373AB199DAC-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-10-02 17:54       ` Jason Gunthorpe
     [not found]         ` <20171002175431.GB13149-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-10-02 18:27           ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171002061532.GJ2031@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox