fxlink: replace __VA_OPT__ with the ugly paste hack

Good job Clang, you really messed up that one.
This commit is contained in:
Lephenixnoir 2021-04-10 22:57:31 +02:00
parent 1ad9079d90
commit 2c6a46963d
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -11,22 +11,22 @@
/* Literal error message printed to stderr, evaluates to 1 for a combined /* Literal error message printed to stderr, evaluates to 1 for a combined
return/exit() call */ return/exit() call */
#define err(fmt, ...) ({ \ #define err(fmt, ...) ({ \
fprintf(stderr, "error: " fmt "\n" __VA_OPT__(,) __VA_ARGS__); \ fprintf(stderr, "error: " fmt "\n", ##__VA_ARGS__); \
1; \ 1; \
}) })
/* Fatal error that includes a libusb error message */ /* Fatal error that includes a libusb error message */
#define libusb_err(rc, fmt, ...) ({ \ #define libusb_err(rc, fmt, ...) ({ \
fprintf(stderr, "error: " fmt ": %s\n" __VA_OPT__(,) __VA_ARGS__, \ fprintf(stderr, "error: " fmt ": %s\n", ##__VA_ARGS__, \
libusb_strerror(rc)); \ libusb_strerror(rc)); \
1; \ 1; \
}) })
/* Warning message */ /* Warning message */
#define wrn(fmt, ...) \ #define wrn(fmt, ...) \
fprintf(stderr, "warning: " fmt "\n" __VA_OPT__(,) __VA_ARGS__) fprintf(stderr, "warning: " fmt "\n", ##__VA_ARGS__)
/* Warning that includes a libusb error message */ /* Warning that includes a libusb error message */
#define libusb_wrn(rc, fmt, ...) \ #define libusb_wrn(rc, fmt, ...) \
fprintf(stderr, "error: " fmt ": %s\n" __VA_OPT__(,) __VA_ARGS__, \ fprintf(stderr, "error: " fmt ": %s\n", ##__VA_ARGS__, \
libusb_strerror(rc)) libusb_strerror(rc))
//--- //---