[Bf-blender-cvs] [aa2904ea13b] blender-v2.81-release: Cycles: Fix strict compiler warning

Sergey Sharybin noreply at git.blender.org
Thu Nov 7 11:12:30 CET 2019


Commit: aa2904ea13b5aa72c5eba0c9e094ad8fc4937990
Author: Sergey Sharybin
Date:   Thu Nov 7 11:06:41 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rBaa2904ea13b5aa72c5eba0c9e094ad8fc4937990

Cycles: Fix strict compiler warning

Pointer used for math arithmetics in assert().
CUDA device pointer is actually an integer type, not a pointer.

===================================================================

M	intern/cycles/device/device_optix.cpp

===================================================================

diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index 3162b72a0dc..831cd8c3148 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1189,7 +1189,7 @@ class OptiXDevice : public Device {
     size_t bytes = 0;
     CUdeviceptr mem = 0;
     check_result_cuda(cuModuleGetGlobal(&mem, &bytes, cuda_module, name));
-    assert(mem != NULL && bytes == data_size);
+    assert(mem != 0 && bytes == data_size);
     check_result_cuda(cuMemcpyHtoD(mem, data, data_size));
   }



More information about the Bf-blender-cvs mailing list