From owner-freebsd-ports@FreeBSD.ORG Thu Sep 27 15:22:13 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DEAB1065672 for ; Thu, 27 Sep 2012 15:22:13 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2649A8FC15 for ; Thu, 27 Sep 2012 15:22:12 +0000 (UTC) Received: from irix.bris.ac.uk ([137.222.10.39] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1THFuX-0001sq-4K; Thu, 27 Sep 2012 16:22:06 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1THFuW-0001im-Ij; Thu, 27 Sep 2012 16:21:56 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q8RFLu0i002609; Thu, 27 Sep 2012 16:21:56 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q8RFLu7t002608; Thu, 27 Sep 2012 16:21:56 +0100 (BST) (envelope-from mexas) Date: Thu, 27 Sep 2012 16:21:56 +0100 (BST) From: Anton Shterenlikht Message-Id: <201209271521.q8RFLu7t002608@mech-cluster241.men.bris.ac.uk> To: dimitry@andric.com, mexas@bristol.ac.uk In-Reply-To: <50645984.3070208@andric.com> X-Spam-Score: -3.9 X-Spam-Level: --- Cc: freebsd-ports@freebsd.org Subject: Re: clang dangling else help X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 15:22:13 -0000 From: Dimitry Andric On 2012-09-27 14:16, Anton Shterenlikht wrote: > Building my port with clang I get this warning > (gcc doesn't pick this up): > > x11.c:1543:5: warning: add explicit braces to avoid dangling else [-Wdangling-else] > else if (actual_type != None) > ^ > 1 warning generated. If the warning isn't fatal (e.g. you are not using -Werror), and you know the code is right, you could just ignore the warning. Or are you trying to make it warning-free? Yes, would be good to have no warnings. Anyway, this particular one is really worth fixing. Thanks for the clarification. Anton