Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 12:25:02 +0100 (CET)
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/35773: [patch] nfsd does not compile with -DDEBUG
Message-ID:  <20020311112502.AD13B1151C@shalmaneser.enst.fr>

next in thread | raw e-mail | index | archive | help

>Number:         35773
>Category:       bin
>Synopsis:       [patch] nfsd does not compile with -DDEBUG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 11 04:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Quinot
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Thu Feb 28 18:08:36 CET 2002 quinot@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386


	
>Description:
	When compiled with -DDEBUG, nfsd #defines syslog to a macro with
	a fixed number of arguments, whereas it should use a variadic
	macro.
>How-To-Repeat:
# cd /usr/src/sbin/nfsd
# make CFLAGS=-DDEBUG
cc -DDEBUG -c /usr/src/sbin/nfsd/nfsd.c
/usr/src/sbin/nfsd/nfsd.c:383: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:406: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:452: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:476: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:518: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:542: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:593: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:617: macro `syslog' used with too many (3) args
/usr/src/sbin/nfsd/nfsd.c:750: macro `syslog' used with too many (4) args

>Fix:

--- sbin/nfsd/nfsd.c.dist	Mon Mar 11 11:31:35 2002
+++ sbin/nfsd/nfsd.c	Mon Mar 11 11:31:03 2002
@@ -75,7 +75,7 @@
 
 /* Global defs */
 #ifdef DEBUG
-#define	syslog(e, s)	fprintf(stderr,(s))
+#define	syslog(e, s...)	fprintf(stderr,s)
 int	debug = 1;
 #else
 int	debug = 0;


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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