From e66eeefb148b5673a43b41d5fb502526d3ec7588 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 28 Sep 2019 18:20:56 +0700 Subject: [PATCH] Fixed build on macOS. --- src/backend/opencl/wrappers/OclDevice.cpp | 4 ++-- src/backend/opencl/wrappers/OclPlatform.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/opencl/wrappers/OclDevice.cpp b/src/backend/opencl/wrappers/OclDevice.cpp index b10713d47..67f8166b5 100644 --- a/src/backend/opencl/wrappers/OclDevice.cpp +++ b/src/backend/opencl/wrappers/OclDevice.cpp @@ -59,7 +59,7 @@ extern bool ocl_vega_cn_generator(const OclDevice &device, const Algorithm &algo extern bool ocl_generic_cn_generator(const OclDevice &device, const Algorithm &algorithm, OclThreads &threads); -ocl_gen_config_fun generators[] = { +static ocl_gen_config_fun generators[] = { # ifdef XMRIG_ALGO_RANDOMX ocl_generic_rx_generator, # endif @@ -215,6 +215,6 @@ void xmrig::OclDevice::toJSON(rapidjson::Value &out, rapidjson::Document &doc) c out.AddMember("name", name().toJSON(doc), allocator); out.AddMember("bus_id", topology().toString().toJSON(doc), allocator); out.AddMember("cu", computeUnits(), allocator); - out.AddMember("global_mem", globalMemSize(), allocator); + out.AddMember("global_mem", static_cast(globalMemSize()), allocator); } #endif diff --git a/src/backend/opencl/wrappers/OclPlatform.cpp b/src/backend/opencl/wrappers/OclPlatform.cpp index 987ec5e30..601ee6fae 100644 --- a/src/backend/opencl/wrappers/OclPlatform.cpp +++ b/src/backend/opencl/wrappers/OclPlatform.cpp @@ -73,7 +73,7 @@ rapidjson::Value xmrig::OclPlatform::toJSON(rapidjson::Document &doc) const } Value out(kObjectType); - out.AddMember("index", index(), allocator); + out.AddMember("index", static_cast(index()), allocator); out.AddMember("profile", profile().toJSON(doc), allocator); out.AddMember("version", version().toJSON(doc), allocator); out.AddMember("name", name().toJSON(doc), allocator);