This is some C code from the Make Controller firmware. I’m familiar with what void pointers are, but I’ve never seen syntax like the first line of this function. What precisely is being accomplished by that?
void MakeStarterTask(void* parameters)
{
(void)parameters;
Run();
TaskDelete(NULL);
}
It “uses”
parametersso the compiler won’t emit a warning about an unused parameter, but the expression does itself nothing. Any expression can be cast tovoid, which discards the result.(Keep in mind that the expression is still evaluated; to make an expression completely ignored is trickier.)