Single statement macros should not use a do {} while (0) loop
Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
(*jenv)->ThrowNew(jenv, excep, msg);
}
-#define OOM(jenv) do { throw_excep(jenv, "java/lang/OutOfMemoryError", __LINE__); } while (0)
+#define OOM(jenv) throw_excep(jenv, "java/lang/OutOfMemoryError", __LINE__)
static struct libctx *getctx(JNIEnv *jenv, jobject jobj)
{
/* Before OpenSSL 1.1 we could do this directly. And needed to. */
#ifndef SSL_CTX_get_extra_chain_certs_only
#define SSL_CTX_get_extra_chain_certs_only(ctx, st) \
- do { *(st) = (ctx)->extra_certs; } while(0)
+ (void)(*(st) = (ctx)->extra_certs)
#endif
static void workaround_openssl_certchain_bug(struct openconnect_info *vpninfo,
#define free_scard_error(str) free(str)
#else
#define scard_error(st) ((char *)pcsc_stringify_error(st))
-#define free_scard_error(str) do { ; } while (0)
+#define free_scard_error(str)
#endif