Cycles: Cleanup, space after (void)

It was used in like 95% of places.
This commit is contained in:
Sergey Sharybin 2018-11-09 12:08:51 +01:00
parent 2330cadb0f
commit 203de0bbf0
24 changed files with 46 additions and 46 deletions

@ -635,8 +635,8 @@ static ShaderNode *add_node(Scene *scene,
}
}
#else
(void)b_data;
(void)b_ntree;
(void) b_data;
(void) b_ntree;
#endif
}
else if(b_node.is_a(&RNA_ShaderNodeTexImage)) {

@ -81,11 +81,11 @@ public:
/* Silence potential warnings about unused variables
* when compiling without some architectures. */
(void)kernel_sse2;
(void)kernel_sse3;
(void)kernel_sse41;
(void)kernel_avx;
(void)kernel_avx2;
(void) kernel_sse2;
(void) kernel_sse3;
(void) kernel_sse41;
(void) kernel_avx;
(void) kernel_avx2;
#ifdef WITH_CYCLES_OPTIMIZED_KERNEL_AVX2
if(DebugFlags().cpu.has_avx2() && system_cpu_support_avx2()) {
architecture_name = "AVX2";

@ -211,7 +211,7 @@ public:
/*cuda_abort();*/ \
cuda_error_documentation(); \
} \
} (void)0
} (void) 0
bool cuda_error_(CUresult result, const string& stmt)
{
@ -2146,7 +2146,7 @@ public:
/*cuda_abort();*/ \
device->cuda_error_documentation(); \
} \
} (void)0
} (void) 0
/* CUDA context scope. */
@ -2530,7 +2530,7 @@ string device_cuda_capabilities()
capabilities += string_printf("\t\tCU_DEVICE_ATTRIBUTE_" #attr "\t\t\t%d\n", \
value); \
} \
} (void)0
} (void) 0
/* TODO(sergey): Strip all attributes which are not useful for us
* or does not depend on the driver.
*/

@ -245,7 +245,7 @@ public:
(device)->set_error(message); \
fprintf(stderr, "%s\n", message.c_str()); \
} \
} (void)0
} (void) 0
#define opencl_assert(stmt) \
{ \
@ -257,7 +257,7 @@ public:
error_msg = message; \
fprintf(stderr, "%s\n", message.c_str()); \
} \
} (void)0
} (void) 0
class OpenCLDeviceBase : public Device
{

@ -106,7 +106,7 @@ cl_context OpenCLCache::get_context(cl_platform_id platform,
cl_int ciErr = clRetainContext(slot.context);
assert(ciErr == CL_SUCCESS);
(void)ciErr;
(void) ciErr;
return slot.context;
}
@ -153,7 +153,7 @@ cl_program OpenCLCache::get_program(cl_platform_id platform,
cl_int ciErr = clRetainProgram(entry.program);
assert(ciErr == CL_SUCCESS);
(void)ciErr;
(void) ciErr;
return entry.program;
}
@ -188,7 +188,7 @@ void OpenCLCache::store_context(cl_platform_id platform,
* The caller is going to release the object when done with it. */
cl_int ciErr = clRetainContext(context);
assert(ciErr == CL_SUCCESS);
(void)ciErr;
(void) ciErr;
}
void OpenCLCache::store_program(cl_platform_id platform,
@ -227,7 +227,7 @@ void OpenCLCache::store_program(cl_platform_id platform,
*/
cl_int ciErr = clRetainProgram(program);
assert(ciErr == CL_SUCCESS);
(void)ciErr;
(void) ciErr;
}
string OpenCLCache::get_kernel_md5()

@ -281,7 +281,7 @@ ccl_device_intersect bool scene_intersect_local(KernelGlobals *kg,
ray.t,
&ob_itfm);
/* bvh_instance_motion_push() returns the inverse transform but it's not needed here. */
(void)ob_itfm;
(void) ob_itfm;
rtc_ray.org_x = P.x;
rtc_ray.org_y = P.y;

@ -97,7 +97,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
(void)inodes;
(void) inodes;
if(false
#ifdef __VISIBILITY_FLAG__

@ -97,7 +97,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(OBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
(void)inodes;
(void) inodes;
if(UNLIKELY(node_dist > isect->t)
#if BVH_FEATURE(BVH_MOTION)

@ -98,7 +98,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
(void)inodes;
(void) inodes;
if(false
#ifdef __VISIBILITY_FLAG__

@ -106,7 +106,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
/* Traverse internal nodes. */
while(node_addr >= 0 && node_addr != ENTRYPOINT_SENTINEL) {
float4 inodes = kernel_tex_fetch(__bvh_nodes, node_addr+0);
(void)inodes;
(void) inodes;
if(UNLIKELY(node_dist > isect->t)
#if BVH_FEATURE(BVH_MOTION)

@ -26,7 +26,7 @@ template<typename T> struct TextureInterpolator {
u[1] = (( 0.5f * t - 1.0f) * t ) * t + (2.0f/3.0f); \
u[2] = (( -0.5f * t + 0.5f) * t + 0.5f) * t + (1.0f/6.0f); \
u[3] = (1.0f / 6.0f) * t * t * t; \
} (void)0
} (void) 0
static ccl_always_inline float4 read(float4 r)
{

@ -142,7 +142,7 @@ ccl_device_inline float svm_image_texture_frac(float x, int *ix)
u[1] = (( 0.5f * t - 1.0f) * t ) * t + (2.0f/3.0f); \
u[2] = (( -0.5f * t + 0.5f) * t + 0.5f) * t + (1.0f/6.0f); \
u[3] = (1.0f / 6.0f) * t * t * t; \
} (void)0
} (void) 0
ccl_device float4 kernel_tex_image_interp(KernelGlobals *kg, int id, float x, float y)
{

@ -1053,7 +1053,7 @@ bool OSLRenderServices::texture(ustring filename,
* other nasty stuff happening.
*/
string err = ts->geterror();
(void)err;
(void) err;
}
return status;
@ -1132,7 +1132,7 @@ bool OSLRenderServices::texture3d(ustring filename,
* other nasty stuff happening.
*/
string err = ts->geterror();
(void)err;
(void) err;
}
return status;

@ -193,7 +193,7 @@ void OSLShader::eval_surface(KernelGlobals *kg, ShaderData *sd, PathState *state
float data[9];
bool found = kg->osl->services->get_attribute(sd, true, OSLRenderServices::u_empty, TypeDesc::TypeVector,
OSLRenderServices::u_geom_undisplaced, data);
(void)found;
(void) found;
assert(found);
memcpy(&sd->P, data, sizeof(float)*3);

@ -24,7 +24,7 @@ CCL_NAMESPACE_BEGIN
ccl_device_inline uint64_t split_data_buffer_size(KernelGlobals *kg, size_t num_elements)
{
(void)kg; /* Unused on CPU. */
(void) kg; /* Unused on CPU. */
uint64_t size = 0;
#define SPLIT_DATA_ENTRY(type, name, num) + align_up(num_elements * num * sizeof(type), 16)
@ -48,7 +48,7 @@ ccl_device_inline void split_data_init(KernelGlobals *kg,
ccl_global void *data,
ccl_global char *ray_state)
{
(void)kg; /* Unused on CPU. */
(void) kg; /* Unused on CPU. */
ccl_global char *p = (ccl_global char*)data;

@ -1291,9 +1291,9 @@ void MeshManager::update_osl_attributes(Device *device, Scene *scene, vector<Att
}
}
#else
(void)device;
(void)scene;
(void)mesh_attributes;
(void) device;
(void) scene;
(void) mesh_attributes;
#endif
}
@ -2301,7 +2301,7 @@ void MeshManager::device_free(Device *device, DeviceScene *dscene)
og->object_names.clear();
}
#else
(void)device;
(void) device;
#endif
}

@ -388,7 +388,7 @@ ShaderManager *ShaderManager::create(Scene *scene, int shadingsystem)
{
ShaderManager *manager;
(void)shadingsystem; /* Ignored when built without OSL. */
(void) shadingsystem; /* Ignored when built without OSL. */
#ifdef WITH_OSL
if(shadingsystem == SHADINGSYSTEM_OSL) {

@ -252,8 +252,8 @@ void PackedPatchTable::pack(Far::PatchTable* patch_table, int offset)
build_patch_map(*this, patch_table, offset);
#else
(void)patch_table;
(void)offset;
(void) patch_table;
(void) offset;
#endif
}

@ -29,7 +29,7 @@
#define atomic_fetch_and_dec_uint32(p) atomic_fetch_and_add_uint32((p), -1)
#define CCL_LOCAL_MEM_FENCE 0
#define ccl_barrier(flags) (void)0
#define ccl_barrier(flags) ((void) 0)
#else /* __KERNEL_GPU__ */

@ -72,7 +72,7 @@
# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
# define ATTR_FALLTHROUGH __attribute__((fallthrough))
# else
# define ATTR_FALLTHROUGH ((void)0)
# define ATTR_FALLTHROUGH ((void) 0)
# endif
#endif /* __KERNEL_GPU__ */
@ -104,14 +104,14 @@ template<typename T> static inline T decltype_helper(T x) { return x; }
#define CHECK_TYPE(var, type) { \
TYPEOF(var) *__tmp; \
__tmp = (type *)NULL; \
(void)__tmp; \
} (void)0
(void) __tmp; \
} (void) 0
#define CHECK_TYPE_PAIR(var_a, var_b) { \
TYPEOF(var_a) *__tmp; \
__tmp = (typeof(var_b) *)NULL; \
(void)__tmp; \
} (void)0
(void) __tmp; \
} (void) 0
#else
# define CHECK_TYPE(var, type)
# define CHECK_TYPE_PAIR(var_a, var_b)

@ -47,7 +47,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
(void)hint;
(void) hint;
size_t size = n * sizeof(T);
util_guarded_mem_alloc(size);
if(n == 0) {

@ -41,7 +41,7 @@ public:
void operator&(StubStream&) { }
};
# define LOG_SUPPRESS() (true) ? (void) 0 : LogMessageVoidify() & StubStream()
# define LOG_SUPPRESS() (true) ? ((void) 0) : LogMessageVoidify() & StubStream()
# define LOG(severity) LOG_SUPPRESS()
# define VLOG(severity) LOG_SUPPRESS()
#endif

@ -53,7 +53,7 @@ public:
T *allocate(size_t n, const void *hint = 0)
{
(void)hint;
(void) hint;
if(n == 0) {
return NULL;
}

@ -52,14 +52,14 @@ int system_cpu_group_thread_count(int group)
util_windows_init_numa_groups();
return GetActiveProcessorCount(group);
#elif defined(__APPLE__)
(void)group;
(void) group;
int count;
size_t len = sizeof(count);
int mib[2] = { CTL_HW, HW_NCPU };
sysctl(mib, 2, &count, &len, NULL, 0);
return count;
#else
(void)group;
(void) group;
return sysconf(_SC_NPROCESSORS_ONLN);
#endif
}