Remove empty initializers to ensure MSVC compatibility.
Add -Wgnu-empty-initializer to Clang builds to catch this issue in the future. Initialising arrays with empty braces is not part of the C standard and fails on MSVC. This commit should catch the issue earlier by detecting it in Clang. PiperOrigin-RevId: 517373961 Change-Id: I518006e84151e8d5b45a7fe00ba7675dfb031ca0
This commit is contained in:
committed by
Copybara-Service
parent
70959c1a2c
commit
ee566eb880
@@ -222,8 +222,8 @@ void mj_collideTree(const mjModel* m, mjData* d, int b1, int b2,
|
||||
const mjtNum* bvh2 = m->bvh_aabb + 6 * bvhadr2;
|
||||
const int* child1 = m->bvh_child + 2 * bvhadr1;
|
||||
const int* child2 = m->bvh_child + 2 * bvhadr2;
|
||||
mjtNum product[36] = {}; // 2 bb x 2 bb x 3 axes (body) x 3 axes (world)
|
||||
mjtNum offset[12] = {}; // 2 bb x 2 bb x 3 axes (world)
|
||||
mjtNum product[36]; // 2 bb x 2 bb x 3 axes (body) x 3 axes (world)
|
||||
mjtNum offset[12]; // 2 bb x 2 bb x 3 axes (world)
|
||||
mjtByte initialize = 1;
|
||||
|
||||
mjMARKSTACK;
|
||||
|
||||
Reference in New Issue
Block a user