Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2012 13:57:00 +0200
From:      Dimitry Andric <dimitry@andric.com>
To:        "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Cc:        Current FreeBSD <freebsd-current@FreeBSD.org>
Subject:   Re: CLANG versus GCC question: compiling non-c99 code with CLANG (clang dumps error)
Message-ID:  <50604A8C.2060502@andric.com>
In-Reply-To: <506047F1.7060804@zedat.fu-berlin.de>
References:  <50602990.2090408@zedat.fu-berlin.de> <50602D4E.1040304@andric.com> <506047F1.7060804@zedat.fu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50604A8C.2060502>