From b3be369153db9efec5bb43c8d3b698194f3d2638 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 23 Mar 2015 12:58:23 +0100 Subject: [PATCH] mtapi_c, mtapi_network_c, mtapi_opencl_c: removed compiler warnings --- mtapi_c/test/embb_mtapi_test_task.cc | 4 ++-- mtapi_network_c/src/embb_mtapi_network.c | 2 +- mtapi_network_c/src/embb_mtapi_network_socket.c | 4 ++-- mtapi_network_c/src/embb_mtapi_network_socket.h | 6 +++++- mtapi_opencl_c/src/embb_mtapi_opencl.c | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mtapi_c/test/embb_mtapi_test_task.cc b/mtapi_c/test/embb_mtapi_test_task.cc index bde956f..8d04992 100644 --- a/mtapi_c/test/embb_mtapi_test_task.cc +++ b/mtapi_c/test/embb_mtapi_test_task.cc @@ -218,11 +218,11 @@ void TaskTest::TestBasic() { mtapi_taskattr_init(&task_attr, &status); MTAPI_CHECK_STATUS(status); - const int kTaskInstances = 5; + const mtapi_uint_t kTaskInstances = 5; status = MTAPI_ERR_UNKNOWN; mtapi_taskattr_set(&task_attr, MTAPI_TASK_INSTANCES, - MTAPI_ATTRIBUTE_VALUE(kTaskInstances), MTAPI_ATTRIBUTE_POINTER_AS_VALUE, + &kTaskInstances, sizeof(mtapi_uint_t), &status); MTAPI_CHECK_STATUS(status); diff --git a/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_network_c/src/embb_mtapi_network.c index c2ef1ef..cd65992 100644 --- a/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_network_c/src/embb_mtapi_network.c @@ -288,7 +288,7 @@ static int embb_mtapi_network_thread(void * args) { mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, - (void*)priority, 0, &local_status); + (void*)&priority, sizeof(int32_t), &local_status); assert(local_status == MTAPI_SUCCESS); memcpy(&func_void, &func, sizeof(void*)); mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, diff --git a/mtapi_network_c/src/embb_mtapi_network_socket.c b/mtapi_network_c/src/embb_mtapi_network_socket.c index 0338564..bd9960c 100644 --- a/mtapi_network_c/src/embb_mtapi_network_socket.c +++ b/mtapi_network_c/src/embb_mtapi_network_socket.c @@ -161,9 +161,9 @@ int embb_mtapi_network_socket_select( } if (timeout >= 0) { - err = select(max_fd.handle + 1, &read_set, NULL, NULL, &tv); + err = select((int)max_fd.handle + 1, &read_set, NULL, NULL, &tv); } else { - err = select(max_fd.handle + 1, &read_set, NULL, NULL, NULL); + err = select((int)max_fd.handle + 1, &read_set, NULL, NULL, NULL); } if (0 == err) { // timeout diff --git a/mtapi_network_c/src/embb_mtapi_network_socket.h b/mtapi_network_c/src/embb_mtapi_network_socket.h index 531cb92..7ce7282 100644 --- a/mtapi_network_c/src/embb_mtapi_network_socket.h +++ b/mtapi_network_c/src/embb_mtapi_network_socket.h @@ -37,7 +37,11 @@ extern "C" { struct embb_mtapi_network_socket_struct { #ifdef _WIN32 - unsigned int handle; +# ifdef _WIN64 + uint64_t handle; +# else + uint32_t handle; +# endif #else int handle; #endif diff --git a/mtapi_opencl_c/src/embb_mtapi_opencl.c b/mtapi_opencl_c/src/embb_mtapi_opencl.c index 4dac209..1049d4d 100644 --- a/mtapi_opencl_c/src/embb_mtapi_opencl.c +++ b/mtapi_opencl_c/src/embb_mtapi_opencl.c @@ -153,7 +153,7 @@ static void opencl_task_start( if (0 == elements) elements = 1; global_work_size = - round_up((int)opencl_action->local_work_size, elements); + round_up((int)opencl_action->local_work_size, (int)elements); opencl_task->task = task; -- libgit2 0.26.0