Mercurial > hg > fxanalyse
comparison DDS_Fox.c @ 63:2320f5fc66aa
Fix varargs handling in DDS Fox driver error function
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 29 Oct 2012 14:43:48 +0100 |
parents | 7ab3fb870ef8 |
children | 64a7a1d3d75c |
comparison
equal
deleted
inserted
replaced
62:53dbce5f0745 | 63:2320f5fc66aa |
---|---|
45 #define error(...) _error(__FILE__, __LINE__, __func__, __VA_ARGS__) | 45 #define error(...) _error(__FILE__, __LINE__, __func__, __VA_ARGS__) |
46 | 46 |
47 void _error(const char *file, int line, const char *func, const char *frmt, ...) | 47 void _error(const char *file, int line, const char *func, const char *frmt, ...) |
48 { | 48 { |
49 va_list args; | 49 va_list args; |
50 va_start(args, line); | 50 va_start(args, frmt); |
51 fprintf(stderr, "ERROR: %s:%d:%s: ", file, line, func); | 51 fprintf(stderr, "ERROR: %s:%d:%s: ", file, line, func); |
52 vfprintf(stderr, frmt, args); | 52 vfprintf(stderr, frmt, args); |
53 fprintf(stderr, "\n"); | 53 fprintf(stderr, "\n"); |
54 va_end(args); | 54 va_end(args); |
55 } | 55 } |