what's the meaning of VOID()
There are the following C code, but what's it's meaning?
VOID(pthread_mutex_init(&tina_mutex,MY_MUTEX_INIT_FAST));
Looks like a preprocessor macro. Your editor should be able to find what it is. Or try
gcc -E source.c > source2.c
It runs the preprocessor only and replaces macros with what they really evaluate to.
pthread_mutex_init returns 0 on success or an error value. I think the macro you have just casts this result to void, thereby convincing the compiler that it shouldn't emit a warning about ignoring the return value..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.