summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2015-07-21 11:34:20 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-08-04 14:43:09 +1000
commit855041d5cc25cc7f45c473fa9c2890a841f28658 (patch)
treeb92574334b867a849381bacf957211ca3d73d966
parentdc059f27e99dad651adc26155cc73ab54a3d2807 (diff)
downloadmongo-855041d5cc25cc7f45c473fa9c2890a841f28658.tar.gz
Merge pull request #2076 from wiredtiger/WT-1989-warning
WT-1989 Use size_t for the log slot size in memory. (cherry picked from commit 24078c61d0c36826db7a8cee973e500901eb29a5)
-rw-r--r--src/include/log.h2
-rw-r--r--src/log/log_slot.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/include/log.h b/src/include/log.h
index 6ac6a804fe0..7a8a13327fa 100644
--- a/src/include/log.h
+++ b/src/include/log.h
@@ -159,7 +159,7 @@ typedef struct {
uint32_t pool_index; /* Global pool index */
WT_LOGSLOT *slot_array[WT_SLOT_ACTIVE]; /* Active slots */
WT_LOGSLOT slot_pool[WT_SLOT_POOL]; /* Pool of all slots */
- uint32_t slot_buf_size; /* Buffer size for slots */
+ size_t slot_buf_size; /* Buffer size for slots */
#define WT_LOG_FORCE_CONSOLIDATE 0x01 /* Disable direct writes */
uint32_t flags;
diff --git a/src/log/log_slot.c b/src/log/log_slot.c
index e0605b228a8..06a60f6088a 100644
--- a/src/log/log_slot.c
+++ b/src/log/log_slot.c
@@ -53,12 +53,11 @@ __wt_log_slot_init(WT_SESSION_IMPL *session)
/*
* Allocate memory for buffers now that the arrays are setup. Split
* this out to make error handling simpler.
- */
- /*
+ *
* Cap the slot buffer to the log file size.
*/
- log->slot_buf_size = (uint32_t)WT_MIN(
- conn->log_file_max, WT_LOG_SLOT_BUF_SIZE);
+ log->slot_buf_size =
+ WT_MIN((size_t)conn->log_file_max, WT_LOG_SLOT_BUF_SIZE);
for (i = 0; i < WT_SLOT_POOL; i++) {
WT_ERR(__wt_buf_init(session,
&log->slot_pool[i].slot_buf, log->slot_buf_size));