From owner-freebsd-hackers Wed Sep 4 15:32:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA06637 for hackers-outgoing; Wed, 4 Sep 1996 15:32:38 -0700 (PDT) Received: from srv1-bsb.GNS.com.br ([200.239.56.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA06627 for ; Wed, 4 Sep 1996 15:32:33 -0700 (PDT) Received: (from mail@localhost) by srv1-bsb.GNS.com.br (8.7.5/8.7.5) id TAA26106; Wed, 4 Sep 1996 19:31:59 -0300 (EST) Received: from dl0124-bsb.gns.com.br(200.239.56.124) by srv1-bsb.GNS.com.br via smap (V1.3) id sma025992; Wed Sep 4 19:31:04 1996 Received: by DANIEL.sobral (IBM OS/2 SENDMAIL VERSION 1.3.14/2.12um) id AA0156; Wed, 04 Sep 96 19:31:46 +0300 Message-Id: <9609041631.AA0156@DANIEL.sobral> Date: Wed, 4 Sep 96 19:31:45 +0300 From: "Daniel C. Sobral" Subject: Re: hackers-digest V1 #1437 To: hackers@freefall.freebsd.org Reply-To: e8917523@linf.unb.br In-Reply-To: <199609041451.HAA15091@freefall.freebsd.org> from "owner-hackers-digest@freefall.freebsd.org" at Sep 4 96 7:51 am X-Disclaimer: Klaatu Barada Nikto! X-Mailer: ELM [version 2.3 PL11] for OS/2 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > : Well, if you do > : int main(void) { printf("Hello world\n"); } > : > : and compile with gcc -Wall, gcc will complain about reaching the end of a > : non-void function. Declaring main() to be void will remove that warning. > : I use void main(void){...} a lot. > > A simple return 0; at the end would fix the problem. Otherwise your > program has a bug in that it will return a random value to the shell > for its exit status (generally 11). Just doc it as a feature... :-) -- Daniel C. Sobral (8-DCS) dcs@gns.com.br e8917523@linf.unb.br