From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: [PATCH 17/28] verbs: Fix incorrect type of len Date: Mon, 5 Sep 2016 15:08:07 -0600 Message-ID: <1473109698-31408-18-git-send-email-jgunthorpe@obsidianresearch.com> References: <1473109698-31408-1-git-send-email-jgunthorpe@obsidianresearch.com> Return-path: In-Reply-To: <1473109698-31408-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Devesh Sharma , Hal Rosenstock , Mike Marciniszyn , Moni Shoua , Sean Hefty , Steve Wise , Tatyana Nikolova , Vladimir Sokolovsky , Yishai Hadas List-Id: linux-rdma@vger.kernel.org gcc remarks: ../librdmacm/examples/udpong.c:301:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (len < 0) len is set by: len = svr_recv(&msg, sizeof msg, &addr, &addrlen); And svr_recv returns: static ssize_t svr_recv(struct message *msg, size_t size, So clearly len is the wrong type, and the error test does not work. Signed-off-by: Jason Gunthorpe --- librdmacm/examples/udpong.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librdmacm/examples/udpong.c b/librdmacm/examples/udpong.c index 97713a297cf9..525ee82b9620 100644 --- a/librdmacm/examples/udpong.c +++ b/librdmacm/examples/udpong.c @@ -291,7 +291,7 @@ out: static int svr_run(void) { - size_t len; + ssize_t len; int ret; ret = svr_bind(); -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html