From 6880937838acad81a5c24d62fed71c5c7fad1d54 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Date: Tue, 14 May 2024 21:14:12 +0200 Subject: [PATCH] core: fix INFO() and ERROR() macros in core/serial_ftdi.cpp Error introduced in da7ea17b66: the INFO() and ERROR() macros pass stdout instead of the format string as first parameter to report_error(). Ooooops. How did this ever pass the compile tests!? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> --- core/serial_ftdi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/serial_ftdi.c b/core/serial_ftdi.c index 556807fd6..e2876132a 100644 --- a/core/serial_ftdi.c +++ b/core/serial_ftdi.c @@ -38,8 +38,8 @@ #endif #include "errorhelper.h" -#define INFO(context, fmt, ...) report_info(stderr, "INFO: " fmt, ##__VA_ARGS__) -#define ERROR(context, fmt, ...) report_info(stderr, "ERROR: " fmt, ##__VA_ARGS__) +#define INFO(context, fmt, ...) report_info("INFO: " fmt, ##__VA_ARGS__) +#define ERROR(context, fmt, ...) report_info("ERROR: " fmt, ##__VA_ARGS__) //#define SYSERROR(context, errcode) ERROR(__FILE__ ":" __LINE__ ": %s", strerror(errcode)) #define SYSERROR(context, errcode) ; @@ -467,7 +467,7 @@ static dc_status_t serial_ftdi_purge (void *io, dc_direction_t queue) size_t input; serial_ftdi_get_available (io, &input); - INFO (device->context, "Flush: queue=%u, input=%lu, output=%i", queue, input, + INFO (device->context, "Flush: queue=%u, input=%lu, output=%i", queue, (unsigned long)input, serial_ftdi_get_transmitted (device)); switch (queue) {