Re: What is this?

New Message Reply Date view Thread view Subject view Author view

Brad (grantham++at++rum)
Mon, 26 Feb 1996 13:53:25 -0800 (PST)


Lance R. Marrou said:
> On Feb 26, 1:34pm, Nuno Godinho wrote:
> > What is the purpose of (channel, data)?
> [munch]
> > static void
> > CullChannel(pfChannel *channel, void *data)
> > {
> > (channel, data);
>
> It's put there to avoid a compiler warning. The function should simply read:
>
> static void
> CullChannel(pfChannel * /* channel */, void * /* data */ )

This works in C++ but not ordinary C.
According to the compiler on IRIX 5.3, prototypes require identifiers.
The definition

    void foo(int * /* a */, int * /* b */){}

yields

> cfe: Error: foo.c, line 1: identifier missing from parameter declaration
> void foo(int * , int * )
> ---------^
> Prototypes for function definitions require identifiers in parameter
> declarations.
> cfe: Error: foo.c, line 1: identifier missing from parameter declaration
> void foo(int * , int * )
> ------------------^
> Prototypes for function definitions require identifiers in parameter
> declarations.

                -Brad

-- 
Brad Grantham, grantham++at++asd.sgi.com, 415-933-4993, http://www.alt.net/~grantham

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:27 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.