From owner-freebsd-hackers Sun Sep 7 15:37:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA15068 for hackers-outgoing; Sun, 7 Sep 1997 15:37:50 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id PAA15062 for ; Sun, 7 Sep 1997 15:37:45 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id AAA25706 for hackers@FreeBSD.ORG; Mon, 8 Sep 1997 00:37:43 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id AAA12829; Mon, 8 Sep 1997 00:26:42 +0200 (MET DST) Message-ID: <19970908002641.TV55800@uriah.heep.sax.de> 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' References: <19970907020657.59233@micron.efn.org> <19970907115417.VA15613@uriah.heep.sax.de> <19970907140416.33084@micron.efn.org> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <19970907140416.33084@micron.efn.org>; from Jonathan Mini on Sep 7, 1997 14:04:16 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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. ;-)