*BSD News Article 46749


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!daffy!uwvax!uchinews!vixen.cso.uiuc.edu!howland.reston.ans.net!news.sprintlink.net!nntp.earthlink.net!usenet
From: Robert Nusbaum <rnusbaum@earthlink.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Howcum I get errors compiling the kernel RESOLVED
Date: 13 Jul 1995 03:24:35 GMT
Organization: Earthlink Network, Inc.
Lines: 71
Message-ID: <3u23lj$mrb@mars.earthlink.net>
References: <3ts6aj$ntl@mars.earthlink.net> <3ttfng$ie1@bonnie.tcd-dresden.de>
NNTP-Posting-Host: mariefrance.earthlink.net
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.1N (Windows; I; 16bit)

Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de> wrote in reference to:

>>The kernel does compile and run properly now but not without the 
>>warnings seen numerous times:
>>
>>"redundant redeclaration of 'DELAY' in same scope" (clock.h) and
>>"previous declaration of 'DELAY'" (cpufunc.h)

>Perhaps they cannot be avoided, i'm not sure right now.  Nothing of
>your interest.  This is rather of an interest for ``kernel hackers''
>(i.e., people who are willing to take a stab at it and make the kernel
>generate less warnings).

Joerg, these warning messages have nothing to do with the kernel but
rather the header file declarations that are read by the compiler.
The kernel is not generating the warnings here, it's the compiler. You
don't need to be a ``kernel hacker'' to clean up a header file.

>>and the more troublesome:
>>"passing arg 2 of nfs_nget from incompatible pointer type" in module
>>nqfs_callback.c

>A harder problem (maybe).  Same comment as above.

Indeed, this problem is caused by either an incorrect function prototype
(less likely) or the lack of appropriate cast to the second argument
of the function call.  This is a ``kernel hacker'' programming problem
and would tend to make me less confident in the NFS implementation.

Why would you think these warnings would not be of my interest?

>>My question:  Is it normal for software distributed in this manner
>>to show any warnings at all?

>Yes.  Many kernel hackers did their best in the path to make the
>kernel compilation less `noisy', and in order to achieve this, the
>default warning level has been increased step by step.  Look at the
>appropriate comment in the Makefile.  In some cases, it's hardly
>possible to eliminate any warning (e.g. for automatically generated
>files), and believe it or not, most commercial packages are written
>more sloppy than the current state of the art in the kernel.

>If it makes you sleep better, remove all -W options from your
>Makefile. :-)

I would agree with you that many commercial packages are written
sloppily.  You can get away with that with applications stuff.
Microsoft has done it for years.  As for operating system software,
I cannot imagine why the most severe and stringent warning flags
would not be turned on all the time and from the beginning, unless
it's somebody's notion of making me sleep better.  This kind of
patronization is not what I would expect from an operating system
I have the sources for. Either it works or it doesn't, and if there
are warnings, I want to know.

I guess because so much of Unix software needs to be recompiled, 
the compiler messages are there for all to see, whereas in the DOS
and Windows environments (competing for the same hardware platform
as FreeBSD), the end user never knows the ugly truth.

However, now that the linen is on the line...

Mind you, I think FreeBSD is great.  The idea that this powerful stuff
is made available to anyone lies at the heart of what the Internet
is all about.  The FreeBSD team has done a tremendous job.

Robert

"Never trust an operating system that isn't built with all compiler
warning flags turned on." X:-)