Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 1997 16:21:03 +1100 (EST)
From:      John Birrell <jb@cimlogic.com.au>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        current@freebsd.org
Subject:   Re: MOD_DECL in lkm.h
Message-ID:  <199701030521.QAA25356@freebsd1.cimlogic.com.au>
In-Reply-To: <199701030453.PAA18846@godzilla.zeta.org.au> from Bruce Evans at "Jan 3, 97 03:53:58 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> >Shouldn't the MOD_DECL macro in lkm.h also have:
> >
> >static int name ## _stat __P((struct lkm_table *lkmtp, int cmd)); \
> >
> >so that the status function has a prototype defined before it is used?
> 
> No, because it causes annoying warnings for modules that don't have a
> stat function when such modules are compiled with -Wunused.

Hmmm. So, when you *do* have a function, it doesn't get checked and
you get a warning. And when you don't, you don't get a warning that
you don't. I think that's the wrong way around. Functional code
should be checked. After all, the kernel is going to call it.

> Bruce
> 


-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au; jb@netbsd.org           119 Cecil Street
Ph  +61  3 9690 6900                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701030521.QAA25356>