vprintf (not printf) must be used with va_list.
Also moved flush() outside the va_list's scope.
Change-Id: Ib82b9f7e7ec1f954619c3eadb8dcaeb08abf113a
void DbgMsg(char *fmt, ...) {
va_list va;
va_start(va, fmt);
- printf(fmt, va);
- fflush(stdout);
+ vprintf(fmt, va);
va_end(va);
+ fflush(stdout);
}
#elif defined __ANDROID__
void DbgMsg(char *fmt, ...) {
va_list va;
va_start(va, fmt);
- printf(fmt, va);
- fflush(stdout);
+ vprintf(fmt, va);
va_end(va);
+ fflush(stdout);
}
#endif