va_args going unused ok?
From: Michael B Allen (mba2000_at_ioplex.com)
Date: 03/30/05
- Previous message: Keith Thompson: "Re: setting initial values in struct template"
- Next in thread: Krishanu Debnath: "Re: va_args going unused ok?"
- Reply: Krishanu Debnath: "Re: va_args going unused ok?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Mar 2005 02:24:37 -0500
Is it legit to not use arguments of a variable argument function? For
example consider that printf here does not use arg if fi = 1.
void
foo(int fi, const char *arg)
{
const char *fmts = { "%s", "" };
printf(fmts[fi], arg);
}
Thanks,
Mike
- Previous message: Keith Thompson: "Re: setting initial values in struct template"
- Next in thread: Krishanu Debnath: "Re: va_args going unused ok?"
- Reply: Krishanu Debnath: "Re: va_args going unused ok?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|