From owner-svn-soc-all@FreeBSD.ORG Thu Sep 5 20:53:15 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 91BFEEA9 for ; Thu, 5 Sep 2013 20:53:15 +0000 (UTC) (envelope-from mattbw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0CB2FC9 for ; Thu, 5 Sep 2013 20:53:15 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85KrF0I057459 for ; Thu, 5 Sep 2013 20:53:15 GMT (envelope-from mattbw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r85KrFR4057454 for svn-soc-all@FreeBSD.org; Thu, 5 Sep 2013 20:53:15 GMT (envelope-from mattbw@FreeBSD.org) Date: Thu, 5 Sep 2013 20:53:15 GMT Message-Id: <201309052053.r85KrFR4057454@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mattbw@FreeBSD.org using -f From: mattbw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r256968 - soc2013/mattbw/backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 20:53:15 -0000 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: