Re: CLANG versus GCC question: compiling non-c99 code with CLANG

看板FB_current作者時間13年前 (2012/09/24 20:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
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. _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1GO4j_6M (FB_current)
文章代碼(AID): #1GO4j_6M (FB_current)