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.
This commit is contained in:
Vladislav Vaintroub 2017-09-19 17:45:17 +00:00
commit eba44874ca
125 changed files with 1053 additions and 1040 deletions

View file

@ -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;
}