Date: 10 Feb 2004 11:30:46 -0000 From: Andreas Hauser <andy@splashground.de> To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= <des@des.no> Cc: freebsd-hackers@freebsd.org Subject: Re: how to fool gcc? Message-ID: <20040210113046.3882.qmail@paladin.fortunaty.net> In-Reply-To: <xzpad3r5mj4.fsf@dwp.des.no> References: <xzpad3r5mj4.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040210113046.3882.qmail>