karimnaaji / voxelizer

Header only mesh voxelizer in c99
http://karim.naaji.fr/voxelizer.html
627 stars 63 forks source link

Warnings with clang 6 #7

Closed mgerhardy closed 5 years ago

mgerhardy commented 5 years ago
voxelizer.h:793:49: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                            vx_triangle_t t1 = {v1, v2, boxcenter, {0.0f, 0.0f, 0.0f}};
                                                ^~~~~~~~~~~~~~~~~
                                                {                }
voxelizer.h:794:49: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                            vx_triangle_t t2 = {v2, v3, boxcenter, {0.0f, 0.0f, 0.0f}};
                                                ^~~~~~~~~~~~~~~~~
                                                {                }
voxelizer.h:795:69: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                            vx_triangle_t t3 = {v3, v1, boxcenter, {0.0f, 0.0f, 0.0f}};
                                                                    ^~~~~~~~~~~~~~~~
                                                                    {               }
voxelizer.h:842:23: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    vx_vertex_t vs = {voxelsizex, voxelsizey, voxelsizez};
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      {                                 }
voxelizer.h:902:21: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    vx_vec3_t vs = {voxelsizex, voxelsizey, voxelsizez};
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                    {                                 }
karimnaaji commented 5 years ago

@mgerhardy ah thanks for the heads up, i'll fix that

mgerhardy commented 5 years ago

fixed with #8