diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-19 17:45:17 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 17:20:46 +0000 |
commit | eba44874ca9fc317696630cb371623142289fa99 (patch) | |
tree | f67cd5dbcaf102abef2fb26f76357d14feaded04 /extra/mariabackup/xbstream.c | |
parent | de7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff) | |
download | mariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz |
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)
- Also fix printf-format warnings
Make the above mentioned warnings fatal.
- fix pthread_join on Windows to set return value.
Diffstat (limited to 'extra/mariabackup/xbstream.c')
-rw-r--r-- | extra/mariabackup/xbstream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extra/mariabackup/xbstream.c b/extra/mariabackup/xbstream.c index f3880f9ec03..fa250132c04 100644 --- a/extra/mariabackup/xbstream.c +++ b/extra/mariabackup/xbstream.c @@ -531,8 +531,8 @@ mode_extract(int n_threads, int argc __attribute__((unused)), ctxt.ds_ctxt = ds_ctxt; ctxt.mutex = &mutex; - tids = malloc(sizeof(pthread_t) * n_threads); - retvals = malloc(sizeof(void*) * n_threads); + tids = calloc(n_threads, sizeof(pthread_t)); + retvals = calloc(n_threads, sizeof(void*)); for (i = 0; i < n_threads; i++) pthread_create(tids + i, NULL, extract_worker_thread_func, @@ -542,7 +542,7 @@ mode_extract(int n_threads, int argc __attribute__((unused)), pthread_join(tids[i], retvals + i); for (i = 0; i < n_threads; i++) { - if ((ulong)retvals[i] == XB_STREAM_READ_ERROR) { + if ((size_t)retvals[i] == XB_STREAM_READ_ERROR) { ret = 1; goto exit; } |