Avoid -Wempty-body warnings from SWIG_contract_assert

This commit is contained in:
Olly Betts 2022-02-11 08:56:16 +13:00 • committed by Olly Betts
commit 31af3ce9bf
11 changed files with 23 additions and 22 deletions

View file

@ -23,12 +23,14 @@ extern "C" {
SWIG_MzScheme_MustGetPtr(s, type, argnum, flags, FUNC_NAME, argc, argv)
#define SWIG_contract_assert(expr,msg) \
if (!(expr)) { \
char *m=(char *) scheme_malloc(strlen(msg)+1000); \
sprintf(m,"SWIG contract, assertion failed: function=%s, message=%s", \
(char *) FUNC_NAME,(char *) msg); \
scheme_signal_error(m); \
}
do { \
if (!(expr)) { \
char *m=(char *) scheme_malloc(strlen(msg)+1000); \
sprintf(m,"SWIG contract, assertion failed: function=%s, message=%s", \
(char *) FUNC_NAME,(char *) msg); \
scheme_signal_error(m); \
} \
} while (0)
/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_MzScheme_GetModule((Scheme_Env *)(clientdata))