We are working on project about Embedded Linux with C and C++ together. I recenty encountered a strange statement in a function:
bool StrangeFunction(void* arg1, void* arg2, void* arg3)
{
(void)arg1;
(void)arg2;
(void)arg3;
unsigned long keycode = (unsigned long)arg2;
switch(keycode)
{
...
I have two question in the code above
- What does it mean that
(void)arg1;? - Is it possible and OK to use
unsigned long keycode = (unsigned long)arg2;
If you don't mind, i need some explanation and related links explaining the subjects. Thanks.