Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 1997 00:26:41 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        hackers@FreeBSD.ORG
Subject:   Re: 'warning: function declaration isn't a prototype'
Message-ID:  <19970908002641.TV55800@uriah.heep.sax.de>
In-Reply-To: <19970907140416.33084@micron.efn.org>; from Jonathan Mini on Sep 7, 1997 14:04:16 -0700
References:  <19970907020657.59233@micron.efn.org> <19970907115417.VA15613@uriah.heep.sax.de> <19970907140416.33084@micron.efn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
As Jonathan Mini wrote:

> ...and I was prototyping. Like this :
> 
> static	void		msctimer();
> 
> I changed it to :
> 
> static	void		msctimer(void);
> 
> ... and the problem went away. Funny, I have never received that watning
> before, and I have been using C (with prototypes like that) for many years.

That's not a `prototype' in the strict ANSI sense.  Unless we were
talking about C++, where the omission of function parameters is
equivalent to declaring the list as just `void'.  But then, C++ always
requires prototypes, unlike ANSI C.

What you've been using is what K&R II calls ``old-style function
declarations''.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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