I have a header file suppose abc.h, where i have function declaration as:
static int function1();
I have included this header file in abc.c and has defined the function and used it.
static int function1()
{
< function definition>
}
After compiling I am getting warning:
warning: function1 declared static but never defined
How can I remove warning, without removing static. Thanks.
static, you're not supposed to put it in a header file (unlessinline)... - user529758()in C. In a declaration this means that the function may receive any type of arguments. In particular this is not considered to be a prototype of the function. For the definition it means a function that does receive no parameter at all. In C you should always use(void)instead. - Jens Gustedt