*BSD News Article 47161


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!newshost.marcam.com!usc!howland.reston.ans.net!Germany.EU.net!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!bonnie.heep!not-for-mail
From: j@bonnie.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Howcum I get errors compiling the kernel RESOLVED
Date: 17 Jul 1995 11:41:50 +0200
Organization: Private U**x site, Dresden.
Lines: 52
Message-ID: <3udb8u$t6i@bonnie.tcd-dresden.de>
References: <3ts6aj$ntl@mars.earthlink.net> <3ttfng$ie1@bonnie.tcd-dresden.de> <3u23lj$mrb@mars.earthlink.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de
NNTP-Posting-Host: 192.109.108.139
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Robert Nusbaum  <rnusbaum@earthlink.net> wrote:

>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.

Our days do only have 48 hours each.  Go for it, correct it, make
a (context or uni)diff, and send-pr it to us.

>>>"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.

Not until i haven't verified it.  E.g., under the X toolkit, it's
common practice to cast back and forth between a generic `Widget' and
the special derived widget classes.  In some cases, you can also omit
the casts.  The resulting code is identical, the cast is not verify-
able by the compiler, all it does is making the intention of the
developer clearer.  As i said: i haven't looked into the above, so i
cannot tell about it.  You are welcome to fix any flaw you find.

>...  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 sloppyness is historical burden.  In the Unix environment, it
took rather long until `modern' things like ANSI prototyping and
strict casting entered the scene.  The philosophy ``every function
returns an int or perhaps a pointer, and can take any number of
arguments i just like'' has been around for (too) long.  Cleaning up
takes time.

Remember, we are often using historical or third-party code.

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

If i had the time...

-- 
cheers, J"org                      private:   joerg_wunsch@uriah.heep.sax.de
                                   http://www.sax.de/~joerg/

Never trust an operating system you don't have sources for. ;-)