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

@ -87,5 +87,5 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC
%insert(runtime) %{
/* Contract support */
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
#define SWIG_contract_assert(nullreturn, expr, msg) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0)
%}