#define CONV_RESULT_LEN 50 /* Maximum length of any */
/* conversion with default */
/* width and prec. */
+#if defined(CPPCHECK)
+# define MACRO_BLKSTMT_BEGIN {
+# define MACRO_BLKSTMT_END }
+#else
+# define MACRO_BLKSTMT_BEGIN do {
+# define MACRO_BLKSTMT_END } while (0)
+#endif
-#define OUT_OF_MEMORY do { \
+#define OUT_OF_MEMORY MACRO_BLKSTMT_BEGIN \
if (CORD_oom_fn != 0) (*CORD_oom_fn)(); \
fprintf(stderr, "Out of memory\n"); \
abort(); \
- } while (0)
+ MACRO_BLKSTMT_END
static int ec_len(CORD_ec x)
{
#endif
#include "de_cmds.h"
-#define OUT_OF_MEMORY do { \
+#if defined(CPPCHECK)
+# define MACRO_BLKSTMT_BEGIN {
+# define MACRO_BLKSTMT_END }
+#else
+# define MACRO_BLKSTMT_BEGIN do {
+# define MACRO_BLKSTMT_END } while (0)
+#endif
+
+#define OUT_OF_MEMORY MACRO_BLKSTMT_BEGIN \
fprintf(stderr, "Out of memory\n"); \
exit(3); \
- } while (0)
+ MACRO_BLKSTMT_END
/* List of line number to position mappings, in descending order. */
/* There may be holes. */
# define REGISTER register
#endif
+#if defined(CPPCHECK)
+# define MACRO_BLKSTMT_BEGIN {
+# define MACRO_BLKSTMT_END }
+#else
+# define MACRO_BLKSTMT_BEGIN do {
+# define MACRO_BLKSTMT_END } while (0)
+#endif
+
#ifndef HEADERS_H
# include "gc_hdrs.h"
#endif
/* literals. C_msg should not contain format specifiers. Arguments */
/* should match their format specifiers. */
#define ABORT_ARG1(C_msg, C_fmt, arg1) \
- do { \
+ MACRO_BLKSTMT_BEGIN \
GC_INFOLOG_PRINTF(C_msg /* + */ C_fmt "\n", arg1); \
ABORT(C_msg); \
- } while (0)
+ MACRO_BLKSTMT_END
#define ABORT_ARG2(C_msg, C_fmt, arg1, arg2) \
- do { \
+ MACRO_BLKSTMT_BEGIN \
GC_INFOLOG_PRINTF(C_msg /* + */ C_fmt "\n", arg1, arg2); \
ABORT(C_msg); \
- } while (0)
+ MACRO_BLKSTMT_END
#define ABORT_ARG3(C_msg, C_fmt, arg1, arg2, arg3) \
- do { \
+ MACRO_BLKSTMT_BEGIN \
GC_INFOLOG_PRINTF(C_msg /* + */ C_fmt "\n", \
arg1, arg2, arg3); \
ABORT(C_msg); \
- } while (0)
+ MACRO_BLKSTMT_END
/* Same as ABORT but does not have 'no-return' attribute. */
/* ABORT on a dummy condition (which is always true). */