I am calling the following library function in two ways:
unsigned int
LsSendToQ(unsigned int p4Node, const char queueName[4], lsMsg *pMsg,
unsigned int prio) {
}
The first way :
LsSendToQ((unsigned int)0, (const char *)Q_NAME, (lsMsg *)(void *)pMsg, 0)
and the second way :
LsSendToQ((unsigned int)0, (const char *)Q_NAME, (lsMsg *)pMsg, 0)
Both calls compile fine, but which one is the right way ? And why is (void *)
used in the first call, which looks like a function pointer to me ?