This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trying to understand: "warning: function declaration isn't a prototype"


Well, I explained why the warning is being emitted.


Yes, because I haven't suppressed it with a switch .. but what I want to know is what the warning means.


Perhaps you could rephrase your question.  Or perhaps you could
provide the exact error message and the line in the source code to
which it refers.


../../common/Headers/msExtern.h:60: warning: function declaration isn't a prototype

------------------------------------
msTypes.h (#included by msDefs.h):
#define FAR
#define FarPtr(type)  type FAR *


------------------------------------ msDefs.h (#included by msExtern.h)

typedef FarPtr(void) TApplContextPtr;


------------------------------------ msExtern.h:60:

TApplContextPtr CreateApplContext ();


------------------------------------ msLinux.c:

TApplContextPtr CreateApplContext()
{
    LinuxContextPtr ptr =
        (LinuxContextPtr) kmalloc(sizeof(LinuxContext), GFP_KERNEL);
  //.. etc ..
    return ptr;
}



The way I interpret this warning, its telling me that "FarPtr(void) CreatApplContext();" resolves to " * CreateApplContext();" .. clearly not a friendly prototype .. but which I suppose should probably be something more like (void) *CreateApplContext(); .. meaning I should fix the "#define FAR" to be "#define FAR void" instead ..

--

;

Jay Vaughan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]