[Bf-blender-cvs] [4cdd621f140] temp-lanpr-cleanup2: Cycles: Fix strict compiler warning

Sergey Sharybin noreply at git.blender.org
Wed Nov 13 06:04:03 CET 2019


Commit: 4cdd621f14009550c693881e10967a3677358464
Author: Sergey Sharybin
Date:   Thu Nov 7 11:06:41 2019 +0100
Branches: temp-lanpr-cleanup2
https://developer.blender.org/rB4cdd621f14009550c693881e10967a3677358464

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