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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux