1
Hello, I’m trying to compile a code with this excerpt:
void D_PostEvent (event_t* ev)
{
events[eventhead] = *ev;
eventhead = (++eventhead)&(MAXEVENTS-1);
}
And I get the following warning:
d_main.c: In function `D_PostEvent':
d_main.c:161: warning: operation on `eventhead' may be undefined
Does anyone know what I’m doing to keep that sign from showing up? Thank you!
Declare the variable
eventhead
as global or pass as parameter to the function.– anonimo