red-channel: Simplify some preprocessor macros

Just pass rest of the arguments.
Removes some extra semicolon.
This change also remove a specific GCC extension.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
Frediano Ziglio 2020-06-19 11:42:11 +01:00
parent 43c7cb167e
commit d8dccabb7d
2 changed files with 5 additions and 10 deletions

View File

@ -229,9 +229,9 @@ static const SpiceDataHeaderOpaque mini_header_wrapper = {NULL, sizeof(SpiceMini
* When an error occurs over a channel, we treat it as a warning
* for spice-server and shutdown the channel.
*/
#define spice_channel_client_error(rcc, format, ...) \
#define spice_channel_client_error(rcc, ...) \
do { \
red_channel_warning(rcc->priv->channel, format, ## __VA_ARGS__); \
red_channel_warning(rcc->priv->channel, __VA_ARGS__); \
rcc->shutdown(); \
} while (0)

View File

@ -198,14 +198,9 @@ inline RedChannel::CreationFlags operator|(RedChannel::CreationFlags a, RedChann
id_, &*channel_, ## __VA_ARGS__); \
} while (0)
#define red_channel_warning(channel, format, ...) \
red_channel_log_generic(g_warning, channel, format, ## __VA_ARGS__);
#define red_channel_message(channel, format, ...) \
red_channel_log_generic(g_message, channel, format, ## __VA_ARGS__);
#define red_channel_debug(channel, format, ...) \
red_channel_log_generic(g_debug, channel, format, ## __VA_ARGS__);
#define red_channel_warning(...) red_channel_log_generic(g_warning, __VA_ARGS__)
#define red_channel_message(...) red_channel_log_generic(g_message, __VA_ARGS__)
#define red_channel_debug(...) red_channel_log_generic(g_debug, __VA_ARGS__)
#include "pop-visibility.h"