diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-07-10 22:32:20 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-07-11 12:32:20 +1000 |
commit | e37a36ab793e357e1fee5df79ddca35d27a6c4a1 (patch) | |
tree | 8eb939cc0bf8bf01c4e30e2816047fe28d06314f /src/include/intpack.i | |
parent | c8dd8777584cd939e49db200f85ca451d3dfb463 (diff) | |
download | mongo-e37a36ab793e357e1fee5df79ddca35d27a6c4a1.tar.gz |
WT-2755 flexelint configuration treats size_t as 4B type (#2858)
KNF, remove space after "sizeof" keyword.
Info 790: Suspicious truncation, integral to float
strlen returns a size_t, cast before comparing against a wt_off_t.
size_t is 8B, more size_t cleanups.
Diffstat (limited to 'src/include/intpack.i')
-rw-r--r-- | src/include/intpack.i | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/intpack.i b/src/include/intpack.i index b27afd24e6c..e8bea58cede 100644 --- a/src/include/intpack.i +++ b/src/include/intpack.i @@ -59,7 +59,7 @@ /* Count the leading zero bytes. */ #if defined(__GNUC__) #define WT_LEADING_ZEROS(x, i) \ - (i = (x == 0) ? (int)sizeof (x) : __builtin_clzll(x) >> 3) + (i = (x == 0) ? (int)sizeof(x) : __builtin_clzll(x) >> 3) #elif defined(_MSC_VER) #define WT_LEADING_ZEROS(x, i) do { \ if (x == 0) i = (int)sizeof(x); \ @@ -89,7 +89,7 @@ __wt_vpack_posint(uint8_t **pp, size_t maxlen, uint64_t x) int len, lz, shift; WT_LEADING_ZEROS(x, lz); - len = (int)sizeof (x) - lz; + len = (int)sizeof(x) - lz; WT_SIZE_CHECK_PACK(len + 1, maxlen); p = *pp; @@ -114,7 +114,7 @@ __wt_vpack_negint(uint8_t **pp, size_t maxlen, uint64_t x) int len, lz, shift; WT_LEADING_ZEROS(~x, lz); - len = (int)sizeof (x) - lz; + len = (int)sizeof(x) - lz; WT_SIZE_CHECK_PACK(len + 1, maxlen); p = *pp; @@ -170,7 +170,7 @@ __wt_vunpack_negint(const uint8_t **pp, size_t maxlen, uint64_t *retp) /* There are four length bits in the first byte. */ p = *pp; - len = (int)sizeof (x) - (*p++ & 0xf); + len = (int)sizeof(x) - (*p++ & 0xf); WT_SIZE_CHECK_UNPACK(len + 1, maxlen); for (x = UINT64_MAX; len != 0; --len) |