summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-01-28 08:49:35 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-01-28 08:49:35 -0500
commit1a72dbfb0dc19b3b937097573fa8b1a5e04124ec (patch)
treeac461c1d0adfefc7b898ae358a786b397b25e9c0 /ext
parent1d0447e18a6707aaefdfa978712048940b0df071 (diff)
downloadmongo-1a72dbfb0dc19b3b937097573fa8b1a5e04124ec.tar.gz
WT-60: big endian support
Stylistic, lint cleanups.
Diffstat (limited to 'ext')
-rw-r--r--ext/compressors/lz4/lz4_compress.c4
-rw-r--r--ext/compressors/snappy/snappy_compress.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/compressors/lz4/lz4_compress.c b/ext/compressors/lz4/lz4_compress.c
index 38c76fe9bb8..3e6609beb80 100644
--- a/ext/compressors/lz4/lz4_compress.c
+++ b/ext/compressors/lz4/lz4_compress.c
@@ -65,7 +65,7 @@ typedef struct {
/*
* lz4_prefix_swap --
* The additional information is written in little-endian format, handle
- * the the conversion.
+ * the conversion.
*/
static inline void
lz4_prefix_swap(LZ4_PREFIX *prefix)
@@ -75,6 +75,8 @@ lz4_prefix_swap(LZ4_PREFIX *prefix)
prefix->uncompressed_len = __wt_bswap32(prefix->uncompressed_len);
prefix->useful_len = __wt_bswap32(prefix->useful_len);
prefix->unused = __wt_bswap32(prefix->unused);
+#else
+ WT_UNUSED(prefix);
#endif
}
diff --git a/ext/compressors/snappy/snappy_compress.c b/ext/compressors/snappy/snappy_compress.c
index 3a7477817af..d1bd2e1813c 100644
--- a/ext/compressors/snappy/snappy_compress.c
+++ b/ext/compressors/snappy/snappy_compress.c
@@ -136,7 +136,10 @@ wt_snappy_decompress(WT_COMPRESSOR *compressor, WT_SESSION *session,
wt_api = ((SNAPPY_COMPRESSOR *)compressor)->wt_api;
- /* Retrieve the saved length, converting endian-ness as necessary. */
+ /*
+ * Retrieve the saved length, handling little- to big-endian conversion
+ * as necessary.
+ */
snaplen = *(size_t *)src;
#ifdef WORDS_BIGENDIAN
snaplen = __wt_bswap64(snaplen);