[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New clean-up patch for gnumach
From: |
olafBuddenhagen |
Subject: |
Re: New clean-up patch for gnumach |
Date: |
Wed, 16 Jul 2008 01:48:14 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi,
On Tue, Jul 15, 2008 at 12:27:02PM -0400, Barry deFreese wrote:
> Here is a patch to fix several "implicit declaration of function"
> warnings.
> +extern void cninit();
If a function does not take any parameters, I think it's better to
always state it explicitely in the prototype, i.e.
extern void cninit(void);
Otherwise the compiler thinks that the paremeters are just not stated in
the prototype, and won't warn if the function is wrongly called with
parameters...
(Note that in the function *definition*, where the function is actually
implemented, () is equivalent to (void), but in the prototype it's not!)
-antrik-