Date: Thu, 5 Sep 2013 20:53:15 GMT From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r256968 - soc2013/mattbw/backend Message-ID: <201309052053.r85KrFR4057454@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mattbw Date: Thu Sep 5 20:53:15 2013 New Revision: 256968 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=256968 Log: Don't bother adding redundant licence joiner under clang. Without this conditional there's a catch-22 situation where GCC complains without the join string and clang complains with it. Modified: soc2013/mattbw/backend/licenses.c Modified: soc2013/mattbw/backend/licenses.c ============================================================================== --- soc2013/mattbw/backend/licenses.c Thu Sep 5 20:48:23 2013 (r256967) +++ soc2013/mattbw/backend/licenses.c Thu Sep 5 20:53:15 2013 (r256968) @@ -42,6 +42,15 @@ struct pkg_license *lic; struct sbuf *sb; + /* + * GCC worries about this being NULL, so initialise it here. + * Clang worries about the lack of enum saturation, so it doesn't + * ever get used as a default though. + */ +#ifndef __clang__ + logic_str = " "; +#endif /* !__clang__ */ + pkg_get(pkg, PKG_LICENSE_LOGIC, &logic); switch (logic) { case LICENSE_OR:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309052053.r85KrFR4057454>