[openbeos] Re: -Wmissing-prototypes
- From: Michael Phipps <mphipps1@xxxxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Tue, 30 Dec 2003 22:52:46 -0500
I think that we need more info. Are these functions that the driver
contains? Kernel functions?
The "proper" way to do this is to put the prototypes in a header file.
There are apps out there that can generate header files from C code. In
general, keeping warnings is a good thing...
Andrew Bachmann wrote:
Hello all,
I've been helping Rudolf with his graphics drivers and we are running into a _lot_ of these
warnings:
warning: no previous prototype for `xxx'
Now, we can fix these by taking every function like this:
int function(void) {
}
And adding this line in front:
extern int function(void);
But this seems really stupid. Does anyone have a strong argument for preserving this warning?
Perhaps there is an alternative warning we could use instead? Or perhaps we could at least
remove it from CCFLAGS and keep it for C++FLAGS?
Andrew
- Follow-Ups:
- [openbeos] Re: -Wmissing-prototypes
- From: Andrew Bachmann
- References:
- [openbeos] -Wmissing-prototypes
- From: Andrew Bachmann
Other related posts:
- » [openbeos] -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
- » [openbeos] Re: -Wmissing-prototypes
I've been helping Rudolf with his graphics drivers and we are running into a _lot_ of these warnings:
warning: no previous prototype for `xxx'
Now, we can fix these by taking every function like this:
int function(void) {
}And adding this line in front:
extern int function(void);
But this seems really stupid. Does anyone have a strong argument for preserving this warning? Perhaps there is an alternative warning we could use instead? Or perhaps we could at least remove it from CCFLAGS and keep it for C++FLAGS?
Andrew
- [openbeos] Re: -Wmissing-prototypes
- From: Andrew Bachmann
- [openbeos] -Wmissing-prototypes
- From: Andrew Bachmann