Standard C requires that pointer types used with
functions with variable argument lists either must be compatible with
that of the actual argument, or that one type must be a pointer to
void and the other a pointer to a character type. GNU C
implements the POSIX XSI extension that additionally permits the use
va_arg with a pointer type to receive arguments of any other
In particular, in GNU C ‘va_arg (ap, void *)’ can safely be used to consume an argument of any pointer type.