I call the following library function in two ways:
unsigned int
LsSendToQ(unsigned int p4Node, const char queueName[4], lsMsg *pMsg,
unsigned int prio) {
}
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 correct? And why is it (void *)used in the first call, which looks like a pointer to a function?
source
share