Prevent accidental fall-through in switch
authorCampbell Barton <ideasman42@gmail.com>
Sun, 24 Jan 2016 01:21:13 +0000 (12:21 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 24 Jan 2016 01:21:13 +0000 (12:21 +1100)
source/blender/gpu/intern/gpu_material.c
source/blender/nodes/shader/nodes/node_shader_vectTransform.c

index 7cb2fc0622dd29ba39a0833473ef2a99bae48774..81f04f0ef22ab79bf414975cf7112fb7c1303b9f 100644 (file)
@@ -416,7 +416,7 @@ void GPU_material_bind_uniforms(
                        if (viewmat) {
                                mul_m4_m4m4(localtoviewmat, viewmat, obmat);
                                invert_m4_m4(invlocaltoviewmat, localtoviewmat);
-                               GPU_shader_uniform_vector(shader, material->invlocaltoviewmatloc, 16, 1, (float*)invlocaltoviewmat);
+                               GPU_shader_uniform_vector(shader, material->invlocaltoviewmatloc, 16, 1, (float *)invlocaltoviewmat);
                        }
                }
                if (material->builtins & GPU_OBCOLOR) {
index 38f143bdf09ad2d1cd8abb9855d8a34c07ff42c0..d31a175b9b45d74ea4c91aeac026232d581dbbcc 100644 (file)
@@ -128,6 +128,7 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to)
                                case SHD_VECT_TRANSFORM_SPACE_CAMERA:
                                        return GPU_builtin(GPU_LOC_TO_VIEW_MATRIX);
                        }
+                       break;
                case SHD_VECT_TRANSFORM_SPACE_WORLD:
                        switch (to) {
                                case SHD_VECT_TRANSFORM_SPACE_WORLD:
@@ -137,6 +138,7 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to)
                                case SHD_VECT_TRANSFORM_SPACE_OBJECT:
                                        return GPU_builtin(GPU_INVERSE_OBJECT_MATRIX);
                        }
+                       break;
                case SHD_VECT_TRANSFORM_SPACE_CAMERA:
                        switch (to) {
                                case SHD_VECT_TRANSFORM_SPACE_CAMERA:
@@ -146,8 +148,9 @@ static GPUNodeLink *get_gpulink_matrix_from_to(short from, short to)
                                case SHD_VECT_TRANSFORM_SPACE_OBJECT:
                                        return GPU_builtin(GPU_INVERSE_LOC_TO_VIEW_MATRIX);
                        }
+                       break;
        }
-       return 0;
+       return NULL;
 }
 static int gpu_shader_vect_transform(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
 {