From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 10 03:30:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 855A516A4CE for ; Tue, 10 Feb 2004 03:30:48 -0800 (PST) Received: from paladin.fortunaty.net (fortunaty.net [217.160.129.175]) by mx1.FreeBSD.org (Postfix) with SMTP id BBEBB43D2F for ; Tue, 10 Feb 2004 03:30:47 -0800 (PST) (envelope-from ah@paladin.fortunaty.net) Received: (qmail 3883 invoked by uid 501); 10 Feb 2004 11:30:46 -0000 Date: 10 Feb 2004 11:30:46 -0000 Message-ID: <20040210113046.3882.qmail@paladin.fortunaty.net> User-Agent: Emai/0.0.2p1 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline References: In-Reply-To: From: Andreas Hauser To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= X-License: BSD X-Addicted: yeah X-Mailman-Approved-At: Tue, 10 Feb 2004 05:30:04 -0800 cc: freebsd-hackers@freebsd.org Subject: Re: how to fool gcc? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 11:30:48 -0000 des wrote @ Tue, 10 Feb 2004 10:09:03 +0100: > Part of the patch declares openpam_log(3) as printf-like so gcc can > check format strings etc. However, openpam_log(3) is also used in > debugging macros such as this: > > #define RETURNS(s) do { \ > if ((s) == NULL) \ > openpam_log(PAM_LOG_DEBUG, "returning NULL"); \ > else \ > openpam_log(PAM_LOG_DEBUG, "returning '%s'", (s)); \ > return (s); \ > } while (0) That is how it looks after preprocessing, obviously not what what you want. ... openpam_log(PAM_LOG_DEBUG, "returning '%s'", (0)); ... Andy