diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-04-01 18:23:57 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-04-01 18:23:57 +1100 |
commit | cb833ba393ce494bec2e6e364d6a09514b213ab2 (patch) | |
tree | c9c7e5d1d590f0955605846c36930dea4d233bb4 | |
parent | a2dec6e48b269db78f94260a5f6f174404affa4a (diff) | |
parent | 874e90b864d6ce5215aa7c77b3b12d424cbbf35c (diff) | |
download | mongo-cb833ba393ce494bec2e6e364d6a09514b213ab2.tar.gz |
Merge pull request #2620 from wiredtiger/wt-2330-compilerfixes
WT-2330 Fix GCC 4.7 compiler warnings.
-rw-r--r-- | src/os_common/filename.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/os_common/filename.c b/src/os_common/filename.c index 83a1a985378..c1109bfc75e 100644 --- a/src/os_common/filename.c +++ b/src/os_common/filename.c @@ -137,8 +137,7 @@ __wt_copy_and_sync(WT_SESSION *wt_session, const char *from, const char *to) WT_DECL_RET; WT_FH *ffh, *tfh; WT_SESSION_IMPL *session; - size_t n; - wt_off_t offset, size; + wt_off_t n, offset, size; char *buf; session = (WT_SESSION_IMPL *)wt_session; @@ -176,9 +175,11 @@ __wt_copy_and_sync(WT_SESSION *wt_session, const char *from, const char *to) /* Get the file's size, then copy the bytes. */ WT_ERR(__wt_filesize(session, ffh, &size)); for (offset = 0; size > 0; size -= n, offset += n) { - n = (size_t)WT_MIN(size, WT_BACKUP_COPY_SIZE); - WT_ERR(__wt_read(session, ffh, offset, n, buf)); - WT_ERR(__wt_write(session, tfh, offset, n, buf)); + n = WT_MIN(size, WT_BACKUP_COPY_SIZE); + WT_ERR(__wt_read( + session, ffh, offset, (size_t)n, buf)); + WT_ERR(__wt_write( + session, tfh, offset, (size_t)n, buf)); } /* Close the from handle, then swap the temporary file into place. */ |