From d6b1c33dd6bc15307b0ba5089fc8d99834061004 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 2 May 2019 12:32:36 +0100 Subject: [PATCH] python: Create macro to hide ugly function signature cast -Wcast-function-type triggers various warnings related to bad api decisions in python source. To avoid these warnings we hide them by casting to void first. Macro here is to hide the uglyness and provide an easy place to either/or + fix better in a single place in the future + identify the places involved should python api change in a way this can be handled better Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- python/modules.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/modules.h b/python/modules.h index e7e97aa1bf4..75108d77907 100644 --- a/python/modules.h +++ b/python/modules.h @@ -21,5 +21,6 @@ #define __SAMBA_PYTHON_MODULES_H__ bool py_update_path(void); - +/* discard signature of 'func' in favour of 'target_sig' */ +#define PY_DISCARD_FUNC_SIG(target_sig, func) (target_sig)(void(*)(void))func #endif /* __SAMBA_PYTHON_MODULES_H__ */