I saw this code in project.
b
\'s type is void*
:
void *b = ...;
int a = (int) (unsigned long) b;
Is this line
I see this in my project too.
For my case, the content of 'b' is populated by other sources/middleware used for inter-process communication.
Once 'b' is populated, the program will get the contents of 'b' with a cast to the correct field 'a'. the application then uses 'a' for processing.
My project uses char* instead of void* though.