Warnings compiling a KLD #including vnode.h

Pranav Peshwe pranavpeshwe at gmail.com
Sun Jan 29 02:22:01 PST 2006


Hello,
         I am trying to write a pretty simple KLD.It compiles and
works correctly.

But,if i #include vnode.h in the KLD then i get a number of warnings saying :

@/sys/vnode.h:597: warning: "struct vop_lease_args" declared inside
parameter list
@/sys/vnode.h:597: warning: its scope is only this definition or
declaration, which is probably not what you want

A similar warning is repeated for many more lines in the same header file.

There is also an error saying 'No such file' (on line 577) -- >
#include "vnode_if.h", i commented the line in the file and the KLD
compiled without an error.But the warnings still remain.

Can these warning be removed ? Are they caused due to an incorrect
sequence in #inclusion of the headers ? I thought this way because the
number of warnings and errors increases significantly if i move the
#include<sys/vnode.h> above some other inclusions.

TIA.

Regards,
Pranav


More information about the freebsd-hackers mailing list