summaryrefslogtreecommitdiff
path: root/test/format
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-06-08 00:58:49 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-06-08 14:58:49 +1000
commit36229a2693aa6e7bcb8fa471edf1ab05ee79869a (patch)
tree4a9e197e64f2d1c1a07b2595c828814cb82019a2 /test/format
parent1e30ff33750b5a5885420654f6d39101b6cb8610 (diff)
downloadmongo-36229a2693aa6e7bcb8fa471edf1ab05ee79869a.tar.gz
WT-2682 add option to configure WiredTiger with strict compiler flags (#2773)
Add the --enable-strict option that uses our current best guess at the right flags for strict compilation. While adding the option, expand the set of flags we can compile cleanly with.
Diffstat (limited to 'test/format')
-rw-r--r--test/format/format.h8
-rw-r--r--test/format/t.c3
-rw-r--r--test/format/wts.c4
3 files changed, 5 insertions, 10 deletions
diff --git a/test/format/format.h b/test/format/format.h
index 8fd9b113311..ad5f408ac30 100644
--- a/test/format/format.h
+++ b/test/format/format.h
@@ -33,12 +33,6 @@
#include <db.h>
#endif
-#if defined(__GNUC__)
-#define WT_GCC_ATTRIBUTE(x) __attribute__(x)
-#else
-#define WT_GCC_ATTRIBUTE(x)
-#endif
-
#define EXTPATH "../../ext/" /* Extensions path */
#define LZ4_PATH \
@@ -266,7 +260,7 @@ typedef struct {
#define TINFO_COMPLETE 2 /* Finished */
#define TINFO_JOINED 3 /* Resolved */
volatile int state; /* state */
-} TINFO WT_GCC_ATTRIBUTE((aligned(WT_CACHE_LINE_ALIGNMENT)));
+} TINFO WT_COMPILER_TYPE_ALIGN(WT_CACHE_LINE_ALIGNMENT);
#ifdef HAVE_BERKELEY_DB
void bdb_close(void);
diff --git a/test/format/t.c b/test/format/t.c
index 085163befe2..2eb2b078804 100644
--- a/test/format/t.c
+++ b/test/format/t.c
@@ -32,7 +32,8 @@ GLOBAL g;
static void format_die(void);
static void startup(void);
-static void usage(void);
+static void usage(void)
+ WT_GCC_FUNC_DECL_ATTRIBUTE((noreturn));
extern int __wt_optind;
extern char *__wt_optarg;
diff --git a/test/format/wts.c b/test/format/wts.c
index 2ee01aa75b5..69195abc3d4 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -87,10 +87,10 @@ handle_message(WT_EVENT_HANDLER *handler,
/* Write and flush the message so we're up-to-date on error. */
if (g.logfp == NULL) {
- out = printf("%p:%s\n", session, message);
+ out = printf("%p:%s\n", (void *)session, message);
(void)fflush(stdout);
} else {
- out = fprintf(g.logfp, "%p:%s\n", session, message);
+ out = fprintf(g.logfp, "%p:%s\n", (void *)session, message);
(void)fflush(g.logfp);
}
return (out < 0 ? EIO : 0);