Subject: lib/7165: stdarg.3 missing va_list declaration in example
To: None <gnats-bugs@gnats.netbsd.org>
From: Julian Assange <proff@yoshi.iq.org>
List: netbsd-bugs
Date: 03/09/1999 22:47:07
>Number: 7165
>Category: lib
>Synopsis: stdarg.3 missing va_list declaration in example
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 15 16:35:00 1999
>Last-Modified:
>Originator: Julian Assange
>Organization:
>Release: <NetBSD-current source date> 1.3I
>Environment:
System: NetBSD yoshi.iq.org 1.3I NetBSD 1.3I (YOSHI.PROF) #5: Sun Jan 24 04:24:47 EST 1999 proff@yoshi.iq.org:/usr/src/sys/arch/i386/compile/YOSHI.PROF i386
>Description:
the follow example is used in stdarg.3:
<SNIP>
void foo(char *fmt, ...)
{
char c, *p, *s;
va_start(ap, fmt);
while (*fmt)
switch(*fmt++) {
<SNIP>
This code is invalid, and instead should be:
void foo(char *fmt, ...)
{
char c, *p, *s;
va_list ap;
va_start(ap, fmt);
while (*fmt)
switch(*fmt++) {
<SNIP>
This code is invalid, and instead should be:
>How-To-Repeat:
man stdarg
>Fix:
see description
>Audit-Trail:
>Unformatted: