Date: Wed, 6 Jun 2012 21:16:27 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r236695 - in head/lib/libc: include net Message-ID: <201206062116.q56LGRco038771@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Jun 6 21:16:26 2012 New Revision: 236695 URL: http://svn.freebsd.org/changeset/base/236695 Log: Fix two warnings about self-assignment in libc. These normally only trigger with clang, when you either use -save-temps, or ccache. Reported by: Sevan / Venture37 <venture37@gmail.com> MFC after: 3 days Modified: head/lib/libc/include/port_before.h head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/include/port_before.h ============================================================================== --- head/lib/libc/include/port_before.h Wed Jun 6 18:04:49 2012 (r236694) +++ head/lib/libc/include/port_before.h Wed Jun 6 21:16:26 2012 (r236695) @@ -17,6 +17,6 @@ var = _u.v; \ } while (0) -#define UNUSED(x) (x) = (x) +#define UNUSED(x) (void)(x) #endif /* _PORT_BEFORE_H_ */ Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Wed Jun 6 18:04:49 2012 (r236694) +++ head/lib/libc/net/getaddrinfo.c Wed Jun 6 21:16:26 2012 (r236695) @@ -464,7 +464,7 @@ getaddrinfo(const char *hostname, const } error = get_portmatch(pai, servname); if (error) - ERR(error); + goto bad; *pai = ai0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206062116.q56LGRco038771>