Work around rest arguments warnings.

This commit is contained in:
ckolivas 2012-03-07 16:01:13 +11:00
parent 43f407aa04
commit af0976f804
2 changed files with 15 additions and 15 deletions

View file

@ -19,8 +19,8 @@ extern int errno;
#include <termios.h> #include <termios.h>
#include <Lrzip.h> #include <Lrzip.h>
#define failure(format, args...) do { \ #define failure(...) do { \
fprintf(stderr, format, ##args); \ fprintf(stderr, __VA_ARGS__); \
exit(1); \ exit(1); \
} while (0) } while (0)

View file

@ -359,7 +359,7 @@ struct rzip_control {
struct stream_info **sinfo_queue; struct stream_info **sinfo_queue;
char delete_outfile; char delete_outfile;
FILE *outputfile; FILE *outputfile;
char library_mode : 1; char library_mode;
int log_level; int log_level;
void (*info_cb)(void *data, int pct, int chunk_pct); void (*info_cb)(void *data, int pct, int chunk_pct);
void *info_data; void *info_data;
@ -429,30 +429,30 @@ static inline void print_err(const rzip_control *control, unsigned int line, con
} }
} }
#define print_stuff(level, format, args...) do {\ #define print_stuff(level, ...) do {\
print_stuff(control, level, __LINE__, __FILE__, __func__, format, ##args); \ print_stuff(control, level, __LINE__, __FILE__, __func__, __VA_ARGS__); \
} while (0) } while (0)
#define print_output(format, args...) do {\ #define print_output(...) do {\
print_stuff(1, format, ##args); \ print_stuff(1, __VA_ARGS__); \
} while (0) } while (0)
#define print_progress(format, args...) do {\ #define print_progress(...) do {\
if (SHOW_PROGRESS) \ if (SHOW_PROGRESS) \
print_stuff(2, format, ##args); \ print_stuff(2, __VA_ARGS__); \
} while (0) } while (0)
#define print_verbose(format, args...) do {\ #define print_verbose(...) do {\
if (VERBOSE) \ if (VERBOSE) \
print_stuff(3, format, ##args); \ print_stuff(3, __VA_ARGS__); \
} while (0) } while (0)
#define print_maxverbose(format, args...) do {\ #define print_maxverbose(...) do {\
if (MAX_VERBOSE) \ if (MAX_VERBOSE) \
print_stuff(4, format, ##args); \ print_stuff(4, __VA_ARGS__); \
} while (0) } while (0)
#define print_err(format, args...) do {\ #define print_err(...) do {\
print_err(control, __LINE__, __FILE__, __func__, format, ##args); \ print_err(control, __LINE__, __FILE__, __func__, __VA_ARGS__); \
} while (0) } while (0)
#endif #endif