From owner-freebsd-current@FreeBSD.ORG Mon Sep 24 11:57:04 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B989A106566B for ; Mon, 24 Sep 2012 11:57:04 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 74FBD8FC12 for ; Mon, 24 Sep 2012 11:57:04 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:4c3a:8731:c02a:580a] (unknown [IPv6:2001:7b8:3a7:0:4c3a:8731:c02a:580a]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4AF5D5C59; Mon, 24 Sep 2012 13:57:03 +0200 (CEST) Message-ID: <50604A8C.2060502@andric.com> Date: Mon, 24 Sep 2012 13:57:00 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: "O. Hartmann" References: <50602990.2090408@zedat.fu-berlin.de> <50602D4E.1040304@andric.com> <506047F1.7060804@zedat.fu-berlin.de> In-Reply-To: <506047F1.7060804@zedat.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Current FreeBSD Subject: Re: CLANG versus GCC question: compiling non-c99 code with CLANG (clang dumps error) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 11:57:04 -0000 On 2012-09-24 13:45, O. Hartmann wrote: ... > here it is: > > win.c:796:50: error: non-void function 'lux_freedata' should return a > value [-Wreturn-type] > if ( current->win.data == (lux_data *)NULL ) return; > ^ Some time ago, the clang developers upgraded this from a warning to an error, which is fairly sensible for new code, but maybe not so for c89 and older. I'm not sure if that was a handy choice, but in any case, you can work around it by adding -Wno-return-type to CFLAGS. > win.c:826:1: warning: type specifier missing, defaults to 'int' > [-Wimplicit-int] > lux_freewins() > ^~~~~~~~~~~~ These warnings can all be ignored for K&R code. Or just add -Wno-implicit-int to shut them up.