d637114c17
The previous definition was: #define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32)) In cases where `field_name` happens to refer to an array, Clang thinks `sizeof(an array value) / sizeof(a type)` is an instance of the idiom where `sizeof` is used to compute an array length. So it thinks the type in the denominator ought to be the array element type, and warns if it isn't, assuming this is a mistake. In reality, `NUM` is not used to get array lengths at all, so there is no mistake. Silence the warning by applying Clang's suggested workaround of parenthesizing the denominator. |
||
---|---|---|
.. | ||
gl_arb_decompiler.cpp | ||
gl_arb_decompiler.h | ||
gl_buffer_cache.cpp | ||
gl_buffer_cache.h | ||
gl_device.cpp | ||
gl_device.h | ||
gl_fence_manager.cpp | ||
gl_fence_manager.h | ||
gl_framebuffer_cache.cpp | ||
gl_framebuffer_cache.h | ||
gl_query_cache.cpp | ||
gl_query_cache.h | ||
gl_rasterizer.cpp | ||
gl_rasterizer.h | ||
gl_resource_manager.cpp | ||
gl_resource_manager.h | ||
gl_sampler_cache.cpp | ||
gl_sampler_cache.h | ||
gl_shader_cache.cpp | ||
gl_shader_cache.h | ||
gl_shader_decompiler.cpp | ||
gl_shader_decompiler.h | ||
gl_shader_disk_cache.cpp | ||
gl_shader_disk_cache.h | ||
gl_shader_manager.cpp | ||
gl_shader_manager.h | ||
gl_shader_util.cpp | ||
gl_shader_util.h | ||
gl_state_tracker.cpp | ||
gl_state_tracker.h | ||
gl_stream_buffer.cpp | ||
gl_stream_buffer.h | ||
gl_texture_cache.cpp | ||
gl_texture_cache.h | ||
maxwell_to_gl.h | ||
renderer_opengl.cpp | ||
renderer_opengl.h | ||
utils.cpp | ||
utils.h |