From 23f22348c5281fff685c1fa89255e7e1e76266a4 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 17 Nov 2019 10:46:03 +0100 Subject: cmake build and gcc warnings --- src/ufo-roof-error.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/ufo-roof-error.h') diff --git a/src/ufo-roof-error.h b/src/ufo-roof-error.h index ed0ae2b..5491f31 100644 --- a/src/ufo-roof-error.h +++ b/src/ufo-roof-error.h @@ -10,49 +10,49 @@ error = NULL; \ } while (0) -#define roof_set_error(error, type, msg...) do { \ - if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, msg); \ +#define roof_set_error(error, type, ...) do { \ + if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, __VA_ARGS__); \ } while (0) -#define roof_error(error, type, msg...) do { \ - if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, msg); \ +#define roof_error(error, type, ...) do { \ + if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, __VA_ARGS__); \ return; \ } while (0) -#define roof_propagate_error(error, err, msg...) do { \ - g_propagate_prefixed_error(error, err, msg); \ +#define roof_propagate_error(error, err, ...) do { \ + g_propagate_prefixed_error(error, err, __VA_ARGS__); \ return; \ } while (0) -#define roof_error_with_retval(error, retval, type, msg...) do { \ - if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, msg); \ +#define roof_error_with_retval(error, retval, type, ...) do { \ + if (error) g_set_error(error, UFO_TASK_ERROR, UFO_TASK_ERROR_##type, __VA_ARGS__); \ return retval; \ } while (0) -#define roof_propagate_error_with_retval(error, retval, err, msg...) do { \ - g_propagate_prefixed_error(error, err, msg); \ +#define roof_propagate_error_with_retval(error, retval, err, ...) do { \ + g_propagate_prefixed_error(error, err, __VA_ARGS__); \ return retval; \ } while (0) -#define roof_setup_error(error, msg...) \ - roof_error(error, SETUP, msg) +#define roof_setup_error(error, ...) \ + roof_error(error, SETUP, __VA_ARGS__) -#define roof_new_error(error, msg...) \ - roof_error_with_retval(error, NULL, SETUP, msg) +#define roof_new_error(error, ...) \ + roof_error_with_retval(error, NULL, SETUP, __VA_ARGS__) -#define roof_network_error(error, msg...) \ - roof_error(error, SETUP, msg) +#define roof_network_error(error, ...) \ + roof_error(error, SETUP, __VA_ARGS__) -#define root_set_network_error(error, msg...) \ - roof_set_error(error, SETUP, msg) +#define root_set_network_error(error, ...) \ + roof_set_error(error, SETUP, __VA_ARGS__) -#define roof_network_error_with_retval(error, retval, msg...) \ - roof_error_with_retval(error, retval, SETUP, msg) +#define roof_network_error_with_retval(error, retval, ...) \ + roof_error_with_retval(error, retval, SETUP, __VA_ARGS__) -#define roof_memory_error(error, msg...) \ - roof_error(error, SETUP, msg) +#define roof_memory_error(error, ...) \ + roof_error(error, SETUP, __VA_ARGS__) #endif /* __UFO_ROOF_ERROR_H */ -- cgit v1.2.3