From owner-freebsd-hackers Sat Jul 6 00:28:49 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA26116 for hackers-outgoing; Sat, 6 Jul 1996 00:28:49 -0700 (PDT) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA26088 for ; Sat, 6 Jul 1996 00:28:45 -0700 (PDT) Received: from palmer.demon.co.uk (localhost [127.0.0.1]) by palmer.demon.co.uk (sendmail/PALMER-2) with ESMTP id IAA20832; Sat, 6 Jul 1996 08:28:35 +0100 (BST) To: grog@lemis.de (Greg Lehey) cc: hackers@FreeBSD.ORG (FreeBSD Hackers) From: "Gary Palmer" Subject: Re: gcc lies? In-reply-to: Your message of "Fri, 05 Jul 1996 12:11:51 +0200." <199607051011.MAA15302@allegro.lemis.de> Date: Sat, 06 Jul 1996 08:28:34 +0100 Message-ID: <20829.836638114@palmer.demon.co.uk> Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Greg Lehey wrote in message ID <199607051011.MAA15302@allegro.lemis.de>: > ../../kern/kern_descrip.c: In function `getdtablesize': > ../../kern/kern_descrip.c:99: warning: unused parameter `uap' > ../../kern/kern_descrip.c: In function `dup2': > ../../kern/kern_descrip.c:127: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c:130: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c:136: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c:139: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c: In function `dup': > ../../kern/kern_descrip.c:181: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c: In function `fcntl': > ../../kern/kern_descrip.c:213: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c:222: warning: comparison between signed and unsigned > ../../kern/kern_descrip.c: In function `close': > (that's not all, but it's enough). > If I compile the same module with the standard release gcc, I get no > warnings at all. How come? At first I thought it might be the header > files, but there's a -nostdinc in there, and I checked: it really does > include just the kernel header files. No, it's not GCC lies, the tightened up quite a bit on their parser and the error checking is a lot more thorough as a result. The end product: LINT has gone from about 100 warnings up to 4000. I'm going to be looking to kill a few of these once 2.1.5 is out and I have time. Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info