From owner-freebsd-ports@FreeBSD.ORG Mon Jun 20 18:00:04 2011 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 E88A31065672 for ; Mon, 20 Jun 2011 18:00:04 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout023.mac.com (asmtpout023.mac.com [17.148.16.98]) by mx1.freebsd.org (Postfix) with ESMTP id BD65E8FC12 for ; Mon, 20 Jun 2011 18:00:04 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp023.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LN300AIBONHMX50@asmtp023.mac.com>; Mon, 20 Jun 2011 10:59:42 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-06-20_04:2011-06-20, 2011-06-20, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1106200159 From: Chuck Swiger In-reply-to: <4DFF76C7.5070001@missouri.edu> Date: Mon, 20 Jun 2011 10:59:41 -0700 Message-id: <432743E3-272A-40F5-AF31-6C1805F620F3@mac.com> References: <20110620153753.GA41541@freebsd.org> <4DFF73E3.5010405@gmail.com> <4DFF76C7.5070001@missouri.edu> To: Stephen Montgomery-Smith X-Mailer: Apple Mail (2.1084) Cc: Niclas Zeising , Roman Divacky , "freebsd-ports@freebsd.org" Subject: Re: [ANNOUNCE]: clang compiling ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2011 18:00:05 -0000 On Jun 20, 2011, at 9:35 AM, Stephen Montgomery-Smith wrote: > What I would like is a primer on how to suppress all the warnings and errors created by K&R code. OK: http://clang.llvm.org/docs/UsersManual.html#cl_diagnostics Of course, you can only suppress warnings; you cannot suppress actual errors. clang doesn't currently support -traditional aka pure K&R C. It's possible that compiling with -ansi aka -std=c89 might help-- at least you should get -Wno-implicit-function-declaration and maybe -Wno-implicit-int. > Also, why is this an error: > error: non-void function 'top_button_cross' should return a value [-Wreturn-type] > when most everything else is a warning. (See http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110616185105/xppaut-5.99.log.) top_button_cross() probably should be declared as returning void. What's presumably happening is that it gets a default return type of int since it doesn't otherwise specify a return type, and then fails to have an explicit return, which is an error. Regards, -- -Chuck