hi, i just studied the code of the provided RTE example for the netStick and found a confusing statement.
in the file "ShmDemo_Resources.c",
line 119,
in the function "TaskResource_ShmDemo_InitLocal"
TLR_RESULT TaskResource_ShmDemo_InitLocal(SHM_DEMO_RSC_T* ptRsc, void* pvInit)
{
/* initialize */
(pvInit = pvInit);
....
}
i'm not new to C, but my eyes didn't see something like that before.
what is the purpose of this statement?
greez, harry
M T
Hilscher Gesellschaft für Systemautomation mbH
I think you've seen UNREFERENCED_PARAMETER(a) in standard C (Commonly used under Windows) before.
a = a; is the same. It avoids compiler warnings about unreferenced parameters.
Regards
MT