Wrong type given to va_arg in error.c