mirror of
https://git.planet-casio.com/Lephenixnoir/fxsdk.git
synced 2024-12-28 20:43:37 +01:00
fxlink: replace __VA_OPT__ with the ugly paste hack
Good job Clang, you really messed up that one.
This commit is contained in:
parent
1ad9079d90
commit
2c6a46963d
1 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||||
|
|
||||||
//---
|
//---
|
||||||
|
|
Loading…
Reference in a new issue