summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-10-04 12:10:17 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-10-04 12:10:17 -0400
commitc2cb2d418a35863c7a84f28afd6463dbdb79b3b4 (patch)
tree025163a8a87180e53e11e5656e3100e2491d2719 /test
parente3df1c8ca35214b0ddc643f27c91390ec49ca7fd (diff)
downloadmongo-c2cb2d418a35863c7a84f28afd6463dbdb79b3b4.tar.gz
Simplify gcc.h, don't repeat the GCC atomic builtins, just use one version.
Break hardware.h up into gcc.h and lint.h (hardware.h is still there, but it's mostly empty). Remove need for gcc.h from various benchmarking/test programs.
Diffstat (limited to 'test')
-rw-r--r--test/checkpoint/test_checkpoint.h1
-rw-r--r--test/fops/t.c12
-rw-r--r--test/fops/thread.h8
-rw-r--r--test/format/backup.c2
-rw-r--r--test/format/bdb.c4
-rw-r--r--test/format/compact.c2
-rw-r--r--test/format/format.h1
-rw-r--r--test/format/wts.c8
-rw-r--r--test/huge/huge.c1
-rw-r--r--test/thread/t.c12
-rw-r--r--test/thread/thread.h8
11 files changed, 32 insertions, 27 deletions
diff --git a/test/checkpoint/test_checkpoint.h b/test/checkpoint/test_checkpoint.h
index 1a6c1abf9d2..2a8bbdcc212 100644
--- a/test/checkpoint/test_checkpoint.h
+++ b/test/checkpoint/test_checkpoint.h
@@ -38,7 +38,6 @@
#include <unistd.h>
#include <wiredtiger.h>
-#include <gcc.h> /* WiredTiger internal */
#include "wt_internal.h" /* For __wt_random */
#define URI_BASE "table:__wt" /* File name */
diff --git a/test/fops/t.c b/test/fops/t.c
index a456e6ad855..1e60e08d0b9 100644
--- a/test/fops/t.c
+++ b/test/fops/t.c
@@ -188,9 +188,9 @@ static int
handle_error(WT_EVENT_HANDLER *handler,
WT_SESSION *session, int error, const char *errmsg)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
- WT_UNUSED(error);
+ (void)(handler);
+ (void)(session);
+ (void)(error);
/* Ignore complaints about missing files. */
if (error == ENOENT)
@@ -208,8 +208,8 @@ static int
handle_message(WT_EVENT_HANDLER *handler,
WT_SESSION *session, const char *message)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
+ (void)(handler);
+ (void)(session);
if (logfp != NULL)
return (fprintf(logfp, "%s\n", message) < 0 ? -1 : 0);
@@ -224,7 +224,7 @@ handle_message(WT_EVENT_HANDLER *handler,
static void
onint(int signo)
{
- WT_UNUSED(signo);
+ (void)(signo);
shutdown();
diff --git a/test/fops/thread.h b/test/fops/thread.h
index 88ac4ede620..00273052e59 100644
--- a/test/fops/thread.h
+++ b/test/fops/thread.h
@@ -38,7 +38,6 @@
#include <unistd.h>
#include <wiredtiger.h>
-#include <gcc.h> /* WiredTiger internal */
extern WT_CONNECTION *conn; /* WiredTiger connection */
@@ -47,7 +46,6 @@ extern u_int nops; /* Operations per thread */
extern const char *uri; /* Object */
extern const char *config; /* Object config */
-void die(const char *, int) WT_GCC_ATTRIBUTE((noreturn));
int fop_start(u_int);
void obj_bulk(void);
void obj_checkpoint(void);
@@ -56,3 +54,9 @@ void obj_cursor(void);
void obj_drop(void);
void obj_upgrade(void);
void obj_verify(void);
+
+void die(const char *, int)
+#if defined(__GNUC__)
+__attribute__((noreturn))
+#endif
+;
diff --git a/test/format/backup.c b/test/format/backup.c
index d0c97df4d7e..1426c9a5fbf 100644
--- a/test/format/backup.c
+++ b/test/format/backup.c
@@ -87,7 +87,7 @@ backup(void *arg)
int ret;
const char *key;
- WT_UNUSED(arg);
+ (void)(arg);
conn = g.wts_conn;
diff --git a/test/format/bdb.c b/test/format/bdb.c
index 1239c57d75e..21e6b40d02f 100644
--- a/test/format/bdb.c
+++ b/test/format/bdb.c
@@ -41,9 +41,9 @@ bdb_compare_reverse(DB *dbp, const DBT *k1, const DBT *k2
size_t len;
int cmp;
- WT_UNUSED(dbp);
+ (void)(dbp);
#if DB_VERSION_MAJOR >= 6
- WT_UNUSED(locp);
+ (void)(locp);
#endif
len = (k1->size < k2->size) ? k1->size : k2->size;
diff --git a/test/format/compact.c b/test/format/compact.c
index 12af0c7b56c..b1c392461af 100644
--- a/test/format/compact.c
+++ b/test/format/compact.c
@@ -39,7 +39,7 @@ compact(void *arg)
u_int period;
int ret;
- WT_UNUSED(arg);
+ (void)(arg);
/* Compaction isn't supported for all data sources. */
if (DATASOURCE("helium") || DATASOURCE("kvsbdb"))
diff --git a/test/format/format.h b/test/format/format.h
index d45fe1d8778..01fbad98af4 100644
--- a/test/format/format.h
+++ b/test/format/format.h
@@ -46,7 +46,6 @@
#include <db.h>
#endif
#include <wiredtiger.h>
-#include <gcc.h> /* WiredTiger internal */
#include <wiredtiger_ext.h>
extern WT_EXTENSION_API *wt_api;
diff --git a/test/format/wts.c b/test/format/wts.c
index 5991739c9ce..97136be159d 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -31,8 +31,8 @@ static int
handle_message(WT_EVENT_HANDLER *handler,
WT_SESSION *session, const char *message)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
+ (void)(handler);
+ (void)(session);
if (g.logfp != NULL)
return (fprintf(
@@ -49,8 +49,8 @@ static int
handle_progress(WT_EVENT_HANDLER *handler,
WT_SESSION *session, const char *operation, uint64_t progress)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
+ (void)(handler);
+ (void)(session);
track(operation, progress, NULL);
return (0);
diff --git a/test/huge/huge.c b/test/huge/huge.c
index 35ad31feee9..d94852410f1 100644
--- a/test/huge/huge.c
+++ b/test/huge/huge.c
@@ -32,7 +32,6 @@
#include <unistd.h>
#include <wiredtiger.h>
-#include <gcc.h> /* WiredTiger internal */
static const char *progname; /* Program name */
static uint8_t *big; /* Big key/value buffer */
diff --git a/test/thread/t.c b/test/thread/t.c
index 6af4c5293d4..98972733c87 100644
--- a/test/thread/t.c
+++ b/test/thread/t.c
@@ -213,9 +213,9 @@ static int
handle_error(WT_EVENT_HANDLER *handler,
WT_SESSION *session, int error, const char *errmsg)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
- WT_UNUSED(error);
+ (void)(handler);
+ (void)(session);
+ (void)(error);
return (fprintf(stderr, "%s\n", errmsg) < 0 ? -1 : 0);
}
@@ -224,8 +224,8 @@ static int
handle_message(WT_EVENT_HANDLER *handler,
WT_SESSION *session, const char *message)
{
- WT_UNUSED(handler);
- WT_UNUSED(session);
+ (void)(handler);
+ (void)(session);
if (logfp != NULL)
return (fprintf(logfp, "%s\n", message) < 0 ? -1 : 0);
@@ -240,7 +240,7 @@ handle_message(WT_EVENT_HANDLER *handler,
static void
onint(int signo)
{
- WT_UNUSED(signo);
+ (void)(signo);
shutdown();
diff --git a/test/thread/thread.h b/test/thread/thread.h
index c9d9313ff6d..7d3575b1ece 100644
--- a/test/thread/thread.h
+++ b/test/thread/thread.h
@@ -38,7 +38,6 @@
#include <unistd.h>
#include <wiredtiger.h>
-#include <gcc.h> /* WiredTiger internal */
#define FNAME "file:wt.%03d" /* File name */
#define FNAME_STAT "__stats" /* File name for statistics */
@@ -54,8 +53,13 @@ extern u_int nkeys; /* Keys to load */
extern u_int nops; /* Operations per thread */
extern int session_per_op; /* New session per operation */
-void die(const char *, int) WT_GCC_ATTRIBUTE((noreturn));
void load(const char *);
int rw_start(u_int, u_int);
void stats(void);
void verify(const char *);
+
+void die(const char *, int)
+#if defined(__GNUC__)
+__attribute__((noreturn))
+#endif
+;