Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/avi/intern/avi_options.c2
-rw-r--r--source/blender/blenkernel/intern/armature.c1
-rw-r--r--source/blender/blenkernel/intern/curve.c1
-rw-r--r--source/blender/blenkernel/intern/customdata.c1
-rw-r--r--source/blender/blenkernel/intern/editmesh.c1
-rw-r--r--source/blender/blenkernel/intern/fcurve.c1
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c10
-rw-r--r--source/blender/blenkernel/intern/image.c3
-rw-r--r--source/blender/blenkernel/intern/library.c1
-rw-r--r--source/blender/blenkernel/intern/object.c1
-rw-r--r--source/blender/blenkernel/intern/packedFile.c7
-rw-r--r--source/blender/blenkernel/intern/paint.c9
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c2
-rw-r--r--source/blender/blenkernel/intern/text.c3
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c1
-rw-r--r--source/blender/blenlib/intern/math_color.c4
-rw-r--r--source/blender/blenlib/intern/math_matrix.c2
-rw-r--r--source/blender/blenlib/intern/math_rotation.c3
-rw-r--r--source/blender/blenlib/intern/noise.c10
-rw-r--r--source/blender/blenlib/intern/path_util.c4
-rw-r--r--source/blender/blenlib/intern/string.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c1
-rw-r--r--source/blender/bmesh/operators/bmo_similar.c3
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp4
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c61
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c1
-rw-r--r--source/blender/editors/animation/anim_markers.c6
-rw-r--r--source/blender/editors/animation/keyframing.c7
-rw-r--r--source/blender/editors/interface/interface.c1
-rw-r--r--source/blender/editors/interface/interface_handlers.c11
-rw-r--r--source/blender/editors/interface/interface_widgets.c6
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/mask/mask_ops.c3
-rw-r--r--source/blender/editors/mesh/editmesh_select.c1
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c1
-rw-r--r--source/blender/editors/mesh/mesh_data.c1
-rw-r--r--source/blender/editors/object/object_edit.c20
-rw-r--r--source/blender/editors/object/object_hook.c6
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c9
-rw-r--r--source/blender/editors/screen/screen_ops.c8
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c7
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_action/space_action.c2
-rw-r--r--source/blender/editors/space_clip/space_clip.c4
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c3
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c1
-rw-r--r--source/blender/editors/space_image/space_image.c1
-rw-r--r--source/blender/editors/space_info/space_info.c1
-rw-r--r--source/blender/editors/space_nla/nla_channels.c1
-rw-r--r--source/blender/editors/space_nla/nla_draw.c4
-rw-r--r--source/blender/editors/space_nla/space_nla.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c1
-rw-r--r--source/blender/editors/space_text/space_text.c2
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c2
-rw-r--r--source/blender/editors/space_time/space_time.c3
-rw-r--r--source/blender/editors/space_view3d/drawobject.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/transform/transform.c11
-rw-r--r--source/blender/editors/transform/transform_generics.c4
-rw-r--r--source/blender/editors/transform/transform_manipulator.c7
-rw-r--r--source/blender/editors/transform/transform_orientations.c4
-rw-r--r--source/blender/editors/util/numinput.c48
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.c1
-rw-r--r--source/blender/imbuf/intern/colormanagement.c1
-rw-r--r--source/blender/imbuf/intern/jpeg.c7
-rw-r--r--source/blender/imbuf/intern/png.c1
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c5
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c1
-rw-r--r--source/blender/python/intern/bpy_rna.c46
-rw-r--r--source/blender/python/intern/bpy_rna_array.c3
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c3
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c5
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c3
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c12
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c40
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.cpp3
85 files changed, 285 insertions, 204 deletions
diff --git a/source/blender/avi/intern/avi_options.c b/source/blender/avi/intern/avi_options.c
index f7759a1099f..c552cbe8724 100644
--- a/source/blender/avi/intern/avi_options.c
+++ b/source/blender/avi/intern/avi_options.c
@@ -112,7 +112,7 @@ AviError AVI_set_compress_option(AviMovie *movie, int option_type, int stream, A
awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
}
}
-
+ break;
}
fseek(movie->fp, movie->offset_table[0], SEEK_SET);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 2ede5acd6e9..d37ccae3089 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1329,6 +1329,7 @@ void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compa
mat3_to_compatible_eulO(pchan->eul, pchan->eul, pchan->rotmode, mat);
else
mat3_to_eulO(pchan->eul, pchan->rotmode, mat);
+ break;
}
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 00a479b8b88..b6c4505bd78 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -2173,6 +2173,7 @@ static void make_bevel_list_3D(BevList *bl, int smooth_iter, int twist_mode)
break;
default: /* CU_TWIST_Z_UP default, pre 2.49c */
make_bevel_list_3D_zup(bl);
+ break;
}
if (bl->poly == -1) /* check its not cyclic */
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 28fa5cc689b..92b3c26c91a 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2391,6 +2391,7 @@ bool CustomData_bmesh_merge(CustomData *source, CustomData *dest,
BLI_assert(!"invalid type given");
iter_type = BM_VERTS_OF_MESH;
totelem = bm->totvert;
+ break;
}
dest->pool = NULL;
diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c
index 3e925b73116..74cd8834d5d 100644
--- a/source/blender/blenkernel/intern/editmesh.c
+++ b/source/blender/blenkernel/intern/editmesh.c
@@ -373,5 +373,6 @@ void BKE_editmesh_color_ensure(BMEditMesh *em, const char htype)
break;
default:
BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 55a312f31ba..791c47cc551 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1764,6 +1764,7 @@ static float evaluate_driver(ChannelDriver *driver, const float evaltime)
* This is currently used as the mechanism which allows animated settings to be able
* to be changed via the UI.
*/
+ break;
}
}
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 234f8667632..915c75a0e7f 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -343,6 +343,8 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float
}
default:
printf("Invalid Function-Generator for F-Modifier - %d\n", data->type);
+ break;
+
}
/* execute function callback to set value if appropriate */
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index f60823edcc8..f20506af967 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -445,6 +445,7 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
IDP_FreeProperty(tmp);
MEM_freeN(tmp);
+ break;
}
}
}
@@ -709,9 +710,7 @@ int IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const int is_s
if (prop1->len == prop2->len && prop1->subtype == prop2->subtype) {
return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype] * prop1->len);
}
- else {
- return 0;
- }
+ return 0;
case IDP_GROUP:
{
IDProperty *link1, *link2;
@@ -813,9 +812,7 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
prop->len = prop->totallen = val->array.len;
break;
}
- else {
- return NULL;
- }
+ return NULL;
}
case IDP_STRING:
{
@@ -911,5 +908,6 @@ void IDP_UnlinkProperty(IDProperty *prop)
switch (prop->type) {
case IDP_ID:
IDP_UnlinkID(prop);
+ break;
}
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 135d847cce7..1a444d497a0 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -695,6 +695,7 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
break;
default:
BKE_image_buf_fill_color(rect, rect_float, width, height, color);
+ break;
}
if (rect_float) {
@@ -1120,6 +1121,7 @@ char BKE_imtype_valid_channels(const char imtype)
case R_IMF_IMTYPE_QUICKTIME:
case R_IMF_IMTYPE_DPX:
chan_flag |= IMA_CHAN_FLAG_ALPHA;
+ break;
}
/* bw */
@@ -1131,6 +1133,7 @@ char BKE_imtype_valid_channels(const char imtype)
case R_IMF_IMTYPE_TIFF:
case R_IMF_IMTYPE_IRIS:
chan_flag |= IMA_CHAN_FLAG_BW;
+ break;
}
return chan_flag;
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 4dc1e9be7ed..7eb4a3a2a8d 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1057,6 +1057,7 @@ void free_main(Main *mainvar)
case 32: BKE_libblock_free(lb, id); break;
default:
BLI_assert(0);
+ break;
}
#endif
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 1df64431824..daa57afe14e 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1614,6 +1614,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
if (use_compat) mat3_to_compatible_eulO(ob->rot, ob->rot, ob->rotmode, tmat);
else mat3_to_eulO(ob->rot, ob->rotmode, tmat);
+ break;
}
}
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index f97429d7e65..11d58c945fd 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -85,6 +85,7 @@ int seekPackedFile(PackedFile *pf, int offset, int whence)
break;
default:
oldseek = -1;
+ break;
}
if (seek < 0) {
seek = 0;
@@ -448,7 +449,8 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
temp = local_name;
break;
}
- /* else fall through and create it */
+ /* else create it */
+ /* fall-through */
case PF_WRITE_LOCAL:
if (writePackedFile(reports, local_name, pf, 1) == RET_OK) {
temp = local_name;
@@ -461,7 +463,8 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
temp = abs_name;
break;
}
- /* else fall through and create it */
+ /* else create it */
+ /* fall-through */
case PF_WRITE_ORIGINAL:
if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) {
temp = abs_name;
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 0dbe4c56a09..b47a493581e 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -139,8 +139,7 @@ Paint *BKE_paint_get_active(Scene *sce)
case OB_MODE_EDIT:
if (ts->use_uv_sculpt)
return &ts->uvsculpt->paint;
- else
- return &ts->imapaint.paint;
+ return &ts->imapaint.paint;
}
}
@@ -187,8 +186,7 @@ Paint *BKE_paint_get_active_from_context(const bContext *C)
case OB_MODE_EDIT:
if (ts->use_uv_sculpt)
return &ts->uvsculpt->paint;
- else
- return &ts->imapaint.paint;
+ return &ts->imapaint.paint;
default:
return &ts->imapaint.paint;
}
@@ -238,8 +236,7 @@ PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
case OB_MODE_EDIT:
if (ts->use_uv_sculpt)
return PAINT_SCULPT_UV;
- else
- return PAINT_TEXTURE_2D;
+ return PAINT_TEXTURE_2D;
default:
return PAINT_TEXTURE_2D;
}
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index a300e2f2156..bc0e8f2c728 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -602,7 +602,7 @@ void BKE_rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, shor
RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->spring_damping_z);
RB_constraint_set_equilibrium_6dof_spring(rbc->physics_constraint);
- /* fall through */
+ /* fall-through */
case RBC_TYPE_6DOF:
if (rbc->type == RBC_TYPE_6DOF) /* a litte awkward but avoids duplicate code for limits */
rbc->physics_constraint = RB_constraint_new_6dof(loc, rot, rb1, rb2);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index aec924e15b3..c545943f15c 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1607,6 +1607,7 @@ void txt_print_undo(Text *text)
c_len = BLI_str_utf8_from_unicode(uc, c);
c[c_len] = '\0';
puts(c);
+ break;
}
}
}
@@ -1850,6 +1851,7 @@ static unsigned int txt_undo_read_unicode(const char *undo_buf, int *undo_pos, s
/* should never happen */
BLI_assert(0);
unicode = 0;
+ break;
}
return unicode;
@@ -1925,6 +1927,7 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s
/* should never happen */
BLI_assert(0);
unicode = 0;
+ break;
}
return unicode;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 110d67b3d47..538c98cc899 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -877,6 +877,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
break;
case FFMPEG_MP3:
fmt->audio_codec = CODEC_ID_MP3;
+ /* fall-through */
case FFMPEG_WAV:
fmt->video_codec = CODEC_ID_NONE;
break;
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 3f802c492c2..8cfe4706937 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -150,6 +150,7 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in
break;
default:
assert(!"invalid colorspace");
+ break;
}
*ly = y;
@@ -183,7 +184,8 @@ void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb, in
b = y + 1.772f * cb - 226.816f;
break;
default:
- assert(!"invalid colorspace");
+ BLI_assert(0);
+ break;
}
*lr = r / 255.0f;
*lg = g / 255.0f;
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index cd7dfdc6d2f..312805e23f6 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -839,6 +839,7 @@ void orthogonalize_m3(float mat[3][3], int axis)
break;
default:
BLI_assert(0);
+ break;
}
mul_v3_fl(mat[0], size[0]);
mul_v3_fl(mat[1], size[1]);
@@ -922,6 +923,7 @@ void orthogonalize_m4(float mat[4][4], int axis)
break;
default:
BLI_assert(0);
+ break;
}
mul_v3_fl(mat[0], size[0]);
mul_v3_fl(mat[1], size[1]);
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index dc0c48cf33f..9fd8c479d6e 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -857,7 +857,8 @@ void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float ang
mat[2][2] = 1.0f;
break;
default:
- assert(0);
+ BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 6e52145c653..2f94e833e9d 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1252,6 +1252,7 @@ void voronoi(float x, float y, float z, float *da, float *pa, float me, int dtyp
case 0:
default:
distfunc = dist_Real;
+ break;
}
xi = (int)(floor(x));
@@ -1467,6 +1468,7 @@ float BLI_gNoise(float noisesize, float x, float y, float z, int hard, int noise
x += 1;
y += 1;
z += 1;
+ break;
}
}
@@ -1522,6 +1524,7 @@ float BLI_gTurbulence(float noisesize, float x, float y, float z, int oct, int h
x += 1;
y += 1;
z += 1;
+ break;
}
if (noisesize != 0.0f) {
@@ -1596,6 +1599,7 @@ float mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves
default:
{
noisefunc = orgBlenderNoiseS;
+ break;
}
}
@@ -1667,6 +1671,7 @@ float mg_MultiFractal(float x, float y, float z, float H, float lacunarity, floa
default:
{
noisefunc = orgBlenderNoiseS;
+ break;
}
}
@@ -1734,6 +1739,7 @@ float mg_HeteroTerrain(float x, float y, float z, float H, float lacunarity, flo
default:
{
noisefunc = orgBlenderNoiseS;
+ break;
}
}
@@ -1808,6 +1814,7 @@ float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity
default:
{
noisefunc = orgBlenderNoiseS;
+ break;
}
}
@@ -1884,6 +1891,7 @@ float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity
default:
{
noisefunc = orgBlenderNoiseS;
+ break;
}
}
@@ -1950,6 +1958,7 @@ float mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nba
default:
{
noisefunc1 = orgBlenderNoiseS;
+ break;
}
}
@@ -1985,6 +1994,7 @@ float mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nba
default:
{
noisefunc2 = orgBlenderNoiseS;
+ break;
}
}
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 4c089e99202..c5205ed5d18 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1228,6 +1228,7 @@ const char *BLI_get_folder(int folder_id, const char *subfolder)
default:
BLI_assert(0);
+ break;
}
return path;
@@ -1256,7 +1257,9 @@ const char *BLI_get_user_folder_notest(int folder_id, const char *subfolder)
break;
default:
BLI_assert(0);
+ break;
}
+
if ('\0' == path[0]) {
return NULL;
}
@@ -1306,6 +1309,7 @@ const char *BLI_get_folder_version(const int id, const int ver, const bool do_ch
path[0] = '\0'; /* in case do_check is false */
ok = false;
BLI_assert(!"incorrect ID");
+ break;
}
if (!ok && do_check) {
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 24e14d04c68..cb0d4ae307d 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -240,6 +240,7 @@ size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const siz
goto escape_finish;
case '\\':
case '"':
+ /* fall-through */
/* less common but should also be support */
case '\t':
@@ -253,9 +254,10 @@ size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const siz
/* not enough space to escape */
break;
}
- /* intentionally pass through */
+ /* fall-through */
default:
*dst = *src;
+ break;
}
dst++;
src++;
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 4ec0a3699d0..1af4836c225 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -853,6 +853,7 @@ void BM_elem_attrs_copy_ex(BMesh *bm_src, BMesh *bm_dst, const void *ele_src_v,
break;
default:
BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index ecb776e7589..05c462ac672 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -502,6 +502,7 @@ int bmesh_elem_check(void *element, const char htype)
}
default:
BLI_assert(0);
+ break;
}
BMESH_ASSERT(err == 0);
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c
index a00bef0228b..ef5ed06b61a 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -1890,6 +1890,7 @@ float bmesh_subd_falloff_calc(const int falloff, float val)
break;
default:
BLI_assert(0);
+ break;
}
return val;
diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c
index b02f9cdfaa6..2d6ceb23f37 100644
--- a/source/blender/bmesh/operators/bmo_similar.c
+++ b/source/blender/bmesh/operators/bmo_similar.c
@@ -262,6 +262,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
#endif
default:
BLI_assert(0);
+ break;
}
}
}
@@ -495,6 +496,7 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op)
#endif
default:
BLI_assert(0);
+ break;
}
}
}
@@ -627,6 +629,7 @@ void bmo_similar_verts_exec(BMesh *bm, BMOperator *op)
break;
default:
BLI_assert(0);
+ break;
}
}
}
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index 39a0014ac41..cc91210a385 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -121,10 +121,12 @@ float *BlurBaseOperation::make_dist_fac_inverse(int rad, int falloff)
val = val * val;
break;
case PROP_LIN:
+ /* fall-through */
#ifndef NDEBUG
- /* uninitialized! */
case -1:
+ /* uninitialized! */
BLI_assert(0);
+ break;
#endif
default:
/* nothing */
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index b2c63addb87..845ad72d7aa 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -574,8 +574,7 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (scene->adt)
return GET_ACF_FLAG_PTR(scene->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -719,9 +718,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ob->adt)
return GET_ACF_FLAG_PTR(ob->adt->flag, type);
- else
- return NULL;
-
+ return NULL;
+
default: /* unsupported */
return NULL;
}
@@ -1053,9 +1051,8 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
if (adt) {
return GET_ACF_FLAG_PTR(adt->flag, type);
}
- else
- return NULL;
-
+ return NULL;
+
case ACHANNEL_SETTING_EXPAND: /* expanded */
return GET_ACF_FLAG_PTR(act->flag, type);
@@ -1213,9 +1210,8 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ma->adt)
return GET_ACF_FLAG_PTR(ma->adt->flag, type);
- else
- return NULL;
-
+ return NULL;
+
default: /* unsupported */
return NULL;
}
@@ -1290,8 +1286,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (la->adt)
return GET_ACF_FLAG_PTR(la->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1374,8 +1369,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (tex->adt)
return GET_ACF_FLAG_PTR(tex->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1451,8 +1445,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ca->adt)
return GET_ACF_FLAG_PTR(ca->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1538,8 +1531,7 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (cu->adt)
return GET_ACF_FLAG_PTR(cu->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1615,8 +1607,7 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (key->adt)
return GET_ACF_FLAG_PTR(key->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1692,8 +1683,7 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (wo->adt)
return GET_ACF_FLAG_PTR(wo->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1769,8 +1759,7 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (part->adt)
return GET_ACF_FLAG_PTR(part->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1846,8 +1835,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (mb->adt)
return GET_ACF_FLAG_PTR(mb->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1923,8 +1911,7 @@ static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (arm->adt)
return GET_ACF_FLAG_PTR(arm->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2011,8 +1998,7 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ntree->adt)
return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2088,8 +2074,7 @@ static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (linestyle->adt)
return GET_ACF_FLAG_PTR(linestyle->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2165,8 +2150,7 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (me->adt)
return GET_ACF_FLAG_PTR(me->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2242,8 +2226,7 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (lt->adt)
return GET_ACF_FLAG_PTR(lt->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2319,8 +2302,7 @@ static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (spk->adt)
return GET_ACF_FLAG_PTR(spk->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -3439,6 +3421,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush, otherwise all would open/close at once */
default:
uiButSetFunc(but, achannel_setting_widget_cb, NULL, NULL);
+ break;
}
}
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 59ae45e446a..e04c51b33d8 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2576,6 +2576,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
default:
if (G.debug & G_DEBUG)
printf("Error: Invalid channel type in mouse_anim_channels()\n");
+ break;
}
/* free channels */
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index da76ad8a832..fe41a037fcb 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -763,7 +763,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
MarkerMove *mm = op->customdata;
View2D *v2d = UI_view2d_fromcontext(C);
TimeMarker *marker, *selmarker = NULL;
- float dx, fac;
char str[256];
switch (event->type) {
@@ -791,6 +790,9 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
}
break;
case MOUSEMOVE:
+ {
+ float dx, fac;
+
if (hasNumInput(&mm->num))
break;
@@ -863,6 +865,8 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
ED_area_headerprint(CTX_wm_area(C), str);
}
+ break;
+ }
}
if (event->val == KM_PRESS) {
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 40273101ddf..63acc5a943c 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1962,10 +1962,11 @@ short id_frame_has_keyframe(ID *id, float frame, short filter)
return object_frame_has_keyframe((Object *)id, frame, filter);
break;
- case ID_SCE: /* scene */
+#if 0
// XXX TODO... for now, just use 'normal' behavior
- // break;
-
+ case ID_SCE: /* scene */
+ break;
+#endif
default: /* 'normal type' */
{
AnimData *adt = BKE_animdata_from_id(id);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index b59e06cbc0e..042ca942722 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2525,6 +2525,7 @@ void ui_check_but(uiBut *but)
break;
default:
BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR);
+ break;
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 68cf07f695f..ee316e13dad 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2183,7 +2183,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
- /* pass on purposedly */
+ /* fall-through */
case ENDKEY:
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
event->shift, STRCUR_JUMP_ALL);
@@ -2198,7 +2198,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
- /* pass on purposedly */
+ /* fall-through */
case HOMEKEY:
ui_textedit_move(but, data, STRCUR_DIR_PREV,
event->shift, STRCUR_JUMP_ALL);
@@ -3722,6 +3722,7 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
break;
default:
BLI_assert(0);
+ break;
}
hsv_to_rgb_v(hsv, rgb);
@@ -3794,6 +3795,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF
break;
default:
assert(!"invalid hsv type");
+ break;
}
hsv_to_rgb_v(hsv, rgb);
@@ -6300,11 +6302,11 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
case MIDDLEMOUSE:
case MOUSEPAN:
button_timers_tooltip_remove(C, but);
-
- /* pass on purposedly */
+ /* fall-through */
default:
/* handle button type specific events */
retval = ui_do_button(C, block, but, event);
+ break;
}
}
else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
@@ -6354,6 +6356,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
if (event->customdata == data->flashtimer) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
+ break;
}
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 18c6d969222..594d3e40dcd 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2060,6 +2060,7 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
copy_v3_v3(col1[0], col1[2]);
copy_v3_v3(col1[1], col1[2]);
copy_v3_v3(col1[3], col1[2]);
+ break;
}
/* old below */
@@ -2969,7 +2970,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_LISTLABEL:
wt.wcol_theme = &btheme->tui.wcol_list_item;
- /* No break, we use usual label code too. */
+ /* fall-through */ /* we use usual label code too. */
case UI_WTYPE_LABEL:
wt.draw = NULL;
break;
@@ -3198,9 +3199,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case SEPR:
ui_draw_separator(rect, &tui->wcol_menu_item);
break;
-
default:
wt = widget_type(UI_WTYPE_MENU_ITEM);
+ break;
}
}
else if (but->dt == UI_EMBOSSN) {
@@ -3385,6 +3386,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
default:
wt = widget_type(UI_WTYPE_REGULAR);
+ break;
}
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 32d3d274b47..dc780d6a4f1 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1353,7 +1353,8 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3]
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
break;
default:
- BLI_assert(!"invalid axis arg");
+ BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 134806cf5bd..5c2aacf0713 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -655,8 +655,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
data->accurate = (event->val == KM_PRESS);
- /* no break! update CV position */
-
+ /* fall-through */ /* update CV position */
case MOUSEMOVE:
{
ScrArea *sa = CTX_wm_area(C);
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 313974d1b9d..f50ff45e83b 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1706,6 +1706,7 @@ bool EDBM_selectmode_toggle(bContext *C, const short selectmode_new,
break;
default:
BLI_assert(0);
+ break;
}
switch (selectmode_new) {
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 77a79e57dbc..bf9dd03f170 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1622,6 +1622,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
break;
default:
BLI_assert(0);
+ break;
}
if (!ok) {
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 4cbb5f303f0..69049bd5a26 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -116,6 +116,7 @@ static CustomData *mesh_customdata_get_type(Mesh *me, const char htype, int *r_t
BLI_assert(0);
tot = 0;
data = NULL;
+ break;
}
*r_tot = tot;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 0a69306928a..784dddbfbf3 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1501,36 +1501,38 @@ static const char *object_mode_op_string(int mode)
/* checks the mode to be set is compatible with the object
* should be made into a generic function */
-static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
+static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
{
ObjectMode mode = RNA_enum_get(op->ptr, "mode");
if (ob) {
if (mode == OB_MODE_OBJECT)
- return 1;
+ return true;
switch (ob->type) {
case OB_MESH:
if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
- return 1;
- return 0;
+ return true;
+ break;
case OB_CURVE:
case OB_SURF:
case OB_FONT:
case OB_MBALL:
if (mode & (OB_MODE_EDIT))
- return 1;
- return 0;
+ return true;
+ break;
case OB_LATTICE:
if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT))
- return 1;
+ return true;
+ break;
case OB_ARMATURE:
if (mode & (OB_MODE_EDIT | OB_MODE_POSE))
- return 1;
+ return true;
+ break;
}
}
- return 0;
+ return false;
}
static int object_mode_set_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 1f0163bc391..d739d8d330f 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -318,12 +318,10 @@ static bool object_hook_index_array(Scene *scene, Object *obedit, int *tot, int
BKE_editmesh_tessface_calc(em);
/* check selected vertices first */
- if (return_editmesh_indexar(em, tot, indexar, cent_r)) {
- return true;
- }
- else {
+ if (return_editmesh_indexar(em, tot, indexar, cent_r) == 0) {
return return_editmesh_vgroup(obedit, em, name, cent_r);
}
+ return true;
}
case OB_CURVE:
case OB_SURF:
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index fbb17946454..54e8d8e6599 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -178,7 +178,7 @@ void load_editLatt(Object *obedit)
static int lattice_select_random_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
- Lattice *lt = ((Lattice*)obedit->data)->editlatt->latt;
+ Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f;
int tot;
BPoint *bp;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 965aba5799b..9b3f1a4f3ac 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -290,9 +290,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
return true;
}
- else {
- return false;
- }
+ return false;
}
case ID_LT:
{
@@ -320,9 +318,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
return true;
}
- else {
- return false;
- }
+ return false;
}
}
}
@@ -1098,6 +1094,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
/* we checked if the vertex was added before so no need to test again, simply add */
defvert_add_index_notest(dv, def_nr, weight);
+ break;
}
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 0ef5b1561f1..ff2561dc66f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1154,7 +1154,7 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* execute the events */
switch (event->type) {
case MOUSEMOVE:
-
+ {
x = RNA_int_get(op->ptr, "x");
y = RNA_int_get(op->ptr, "y");
@@ -1164,9 +1164,9 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
area_move_apply(C, op);
break;
-
+ }
case EVT_MODAL_MAP:
-
+ {
switch (event->val) {
case KM_MODAL_APPLY:
area_move_exit(C, op);
@@ -1182,6 +1182,8 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
md->step = 0;
break;
}
+ break;
+ }
}
return OPERATOR_RUNNING_MODAL;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index e6d609d2008..576bbecb561 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -540,8 +540,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
- ;
+ break;
}
return true;
}
@@ -559,8 +560,9 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
- ;
+ break;
}
return true;
}
@@ -575,6 +577,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
break;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f67cc0359a2..3aeb2f1597b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1177,6 +1177,7 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob,
case SCULPT_DISP_DIR_AREA:
calc_area_normal(sd, ob, an, nodes, totnode);
+ break;
default:
break;
@@ -2457,6 +2458,7 @@ static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totn
case SCULPT_DISP_DIR_AREA:
calc_area_normal_and_flatten_center(sd, ob, nodes, totnode, an, fc);
+ break;
default:
break;
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 7b0ff5a656f..a89a02b7e01 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -304,6 +304,7 @@ static void action_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
@@ -351,6 +352,7 @@ static void action_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index e6aff9d4d4f..562a8584560 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -348,7 +348,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
switch (wmn->data) {
case ND_FRAME:
clip_scopes_tag_refresh(sa);
- /* no break! */
+ /* fall-through */
case ND_FRAME_RANGE:
ED_area_tag_redraw(sa);
@@ -368,7 +368,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
case NA_EDITED:
case NA_EVALUATED:
clip_stabilization_tag_refresh(sa);
- /* no break! */
+ /* fall-through */
case NA_SELECTED:
clip_scopes_tag_refresh(sa);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 7899f9faf90..9afca413836 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -788,8 +788,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
data->accurate = event->val == KM_PRESS;
- /* no break! update area size */
-
+ /* fall-through */
case MOUSEMOVE:
mdelta[0] = event->mval[0] - data->mval[0];
mdelta[1] = event->mval[1] - data->mval[1];
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 4d904ab6551..8f25ac38963 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -535,6 +535,7 @@ FileList *filelist_new(short type)
default:
p->readf = filelist_read_dir;
p->filterf = is_filtered_file;
+ break;
}
return p;
@@ -993,6 +994,7 @@ void filelist_sort(struct FileList *filelist, short sort)
break;
case FILE_SORT_EXTENSION:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_extension);
+ break;
}
filelist_filter(filelist);
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 25101d89f1d..ccb98dfd13d 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -436,6 +436,7 @@ static void graph_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AReg
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 2b106e13836..5f54b214437 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -512,6 +512,7 @@ static void image_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
}
break;
}
+ break;
}
}
}
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 10b935502ba..07f4b64d187 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -271,6 +271,7 @@ static void info_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegi
case NC_ID:
if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index defe842a794..c0e559a34cf 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -319,6 +319,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
default:
if (G.debug & G_DEBUG)
printf("Error: Invalid channel type in mouse_nla_channels()\n");
+ break;
}
/* free channels */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 93007cc0820..b4c52a5b1ca 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -307,8 +307,8 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
glVertex2f(strip->start, yminc);
glEnd();
}
- /* no break needed... */
-
+ /* fall-through */
+
/* this only draws after the strip */
case NLASTRIP_EXTEND_HOLD_FORWARD:
/* only need to try and draw if the next strip doesn't occur immediately after */
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index e54c1e8323a..4d4f27cf1ad 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -427,6 +427,7 @@ static void nla_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARe
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
@@ -457,10 +458,10 @@ static void nla_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
-
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 93d0ff4f8c0..81207deea01 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -929,6 +929,7 @@ static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
case OL_KM_SPECIALS:
kmi->type = AKEY;
kmi->val = KM_PRESS;
+ break;
}
ED_region_tag_redraw(CTX_wm_region(C));
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 0f4a2d8b4dd..68fd09f5fb7 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -173,6 +173,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
default:
col[0] = 10; col[1] = 255; col[2] = 40;
+ break;
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index a4dea4e25b1..c13dc118de5 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -558,6 +558,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
return 0;
}
if (seq3 == NULL) seq3 = seq2;
+ break;
}
if (seq1 == NULL && seq2 == NULL && seq3 == NULL) {
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index e7fa4c05b9d..b04d2b16e8d 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -149,7 +149,7 @@ static void text_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
}
ED_area_tag_redraw(sa);
- /* no break -- fall down to tag redraw */
+ /* fall-through */ /* fall down to tag redraw */
case NA_ADDED:
case NA_REMOVED:
ED_area_tag_redraw(sa);
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 26e0be264a4..ba61399f6d5 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -433,6 +433,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
case PAGEDOWNKEY:
scroll = SUGG_LIST_SIZE - 1;
+ /* fall-through */
case WHEELDOWNMOUSE:
case DOWNARROWKEY:
if (event->val == KM_PRESS) {
@@ -460,6 +461,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
case PAGEUPKEY:
scroll = SUGG_LIST_SIZE - 1;
+ /* fall-through */
case WHEELUPMOUSE:
case UPARROWKEY:
if (event->val == KM_PRESS) {
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 8c36df74d22..f7116c01a72 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -201,9 +201,10 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene)
col[3] = 0.1;
break;
default:
- BLI_assert(0);
col[0] = 1.0; col[1] = 0.0; col[2] = 1.0;
col[3] = 0.1;
+ BLI_assert(0);
+ break;
}
glColor4fv(col);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 7f7a97c6836..02686d5b448 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4430,7 +4430,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
copy_m4_m4(imat, rv3d->viewinv);
normalize_v3(imat[0]);
normalize_v3(imat[1]);
- /* no break! */
+ /* fall-through */
case PART_DRAW_CROSS:
case PART_DRAW_AXIS:
/* lets calculate the scale: */
@@ -4604,6 +4604,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
default:
intensity = 1.0f; /* should never happen */
+ BLI_assert(0);
+ break;
}
CLAMP(intensity, 0.f, 1.f);
weight_to_rgb(ma_col, intensity);
@@ -6905,6 +6907,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
drawaxes(1.0, OB_ARROWS);
}
+ break;
}
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 659c9a6c2e6..a1a13130b27 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -518,7 +518,7 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event)
#ifdef NDOF_FLY_DEBUG
puts("start keeping track of 3D mouse position");
#endif
- /* fall through... */
+ /* fall-through */
case P_IN_PROGRESS:
/* update 3D mouse position */
#ifdef NDOF_FLY_DEBUG
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 96cd5a22f58..16282b0d49c 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -856,6 +856,7 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc,
break;
default:
assert(!"lasso select on incorrect object type");
+ break;
}
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc->obedit->data);
@@ -2110,6 +2111,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
break;
default:
assert(!"border select on incorrect object type");
+ break;
}
}
else { /* no editmode, unified for bones and objects */
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 457a3b32e09..a565213f031 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1432,6 +1432,7 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
offset = -offset;
length = -length;
size = -size;
+ /* fall-through */
case RIGHT:
glBegin(GL_LINES);
glVertex2s(offset, 0);
@@ -1442,10 +1443,12 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
glVertex2s(offset + length - size, size);
glEnd();
break;
+
case DOWN:
offset = -offset;
length = -length;
size = -size;
+ /* fall-through */
case UP:
glBegin(GL_LINES);
glVertex2s(0, offset);
@@ -1464,6 +1467,7 @@ static void drawArrowHead(ArrowDirection d, short size)
switch (d) {
case LEFT:
size = -size;
+ /* fall-through */
case RIGHT:
glBegin(GL_LINES);
glVertex2s(0, 0);
@@ -1472,8 +1476,10 @@ static void drawArrowHead(ArrowDirection d, short size)
glVertex2s(-size, size);
glEnd();
break;
+
case DOWN:
size = -size;
+ /* fall-through */
case UP:
glBegin(GL_LINES);
glVertex2s(0, 0);
@@ -1747,6 +1753,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
break;
default:
proportional = PROP_EDIT_OFF;
+ break;
}
// If modal, save settings back in scene if not set as operator argument
@@ -2934,6 +2941,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
case 2:
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("Scale: %s : %s : %s%s %s"), &tvec[0],
&tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
+ break;
}
}
else {
@@ -3900,6 +3908,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, "D: %s D: %s D: %s (%s)%s %s %s",
&tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], distvec,
t->con.text, t->proptext, autoik);
+ break;
}
}
else {
@@ -5690,6 +5699,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
break;
}
}
+ break;
}
default:
break;
@@ -6222,6 +6232,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
calcVertSlideMouseActiveEdges(t, event->mval);
}
calcVertSlideCustomPoints(t);
+ break;
}
default:
break;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 666612880e5..cb0a0530036 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1667,7 +1667,7 @@ void calculateCenter(TransInfo *t)
projectIntView(t, t->center, t->center2d);
}
}
-
+ break;
}
}
@@ -1803,6 +1803,7 @@ void calculatePropRatio(TransInfo *t)
break;
default:
td->factor = 1;
+ break;
}
}
}
@@ -1830,6 +1831,7 @@ void calculatePropRatio(TransInfo *t)
break;
default:
t->proptext[0] = '\0';
+ break;
}
}
else {
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index fc61c94ff64..6fecf0d6642 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -602,7 +602,7 @@ int calc_manipulator_stats(const bContext *C)
break;
}
/* if not gimbal, fall through to normal */
- /* pass through */
+ /* fall-through */
}
case V3D_MANIP_NORMAL:
{
@@ -613,7 +613,7 @@ int calc_manipulator_stats(const bContext *C)
break;
}
/* no break we define 'normal' as 'local' in Object mode */
- /* pass through */
+ /* fall-through */
}
case V3D_MANIP_LOCAL:
{
@@ -840,7 +840,8 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
UI_GetThemeColor3ubv(TH_AXIS_Z, col);
break;
default:
- BLI_assert(!"invalid axis arg");
+ BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 130e11d45aa..2be4a072d49 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -466,14 +466,14 @@ void initTransformOrientation(bContext *C, TransInfo *t)
strcpy(t->spacename, IFACE_("gimbal"));
break;
}
- /* no gimbal fallthrough to normal */
+ /* fall-through */ /* no gimbal fallthrough to normal */
case V3D_MANIP_NORMAL:
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
strcpy(t->spacename, IFACE_("normal"));
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
break;
}
- /* no break we define 'normal' as 'local' in Object mode */
+ /* fall-through */ /* we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
strcpy(t->spacename, IFACE_("local"));
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index bfe3b80eff4..3e5f879aa3c 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -109,6 +109,7 @@ void outputNumInput(NumInput *n, char *str)
break;
default:
BLI_snprintf(&str[j * ln], ln, "%s%.4e%c", inv, n->val[i], cur);
+ break;
}
}
}
@@ -201,8 +202,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
n->inv[idx] = 0;
}
break;
- case PERIODKEY:
- case PADPERIOD:
+ case PERIODKEY: case PADPERIOD:
if (n->flag & NUM_NO_FRACTION)
return 0;
@@ -213,11 +213,13 @@ char handleNumInput(NumInput *n, const wmEvent *event)
break;
case -1:
n->ctrl[idx] = -10;
+ break;
}
break;
case PADMINUS:
if (event->alt)
break;
+ /* fall-through */
case MINUSKEY:
if (n->flag & NUM_NO_NEGATIVE)
return 0;
@@ -229,8 +231,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
else
n->ctrl[idx] = -1;
break;
- case PADSLASHKEY:
- case SLASHKEY:
+ case PADSLASHKEY: case SLASHKEY:
if (n->flag & NUM_NO_FRACTION)
return 0;
@@ -245,35 +246,34 @@ char handleNumInput(NumInput *n, const wmEvent *event)
idx = 0;
n->idx = idx;
break;
- case PAD9:
- case NINEKEY:
+ case PAD9: case NINEKEY:
Val += 1.0f;
- case PAD8:
- case EIGHTKEY:
+ /* fall-through */
+ case PAD8: case EIGHTKEY:
Val += 1.0f;
- case PAD7:
- case SEVENKEY:
+ /* fall-through */
+ case PAD7: case SEVENKEY:
Val += 1.0f;
- case PAD6:
- case SIXKEY:
+ /* fall-through */
+ case PAD6: case SIXKEY:
Val += 1.0f;
- case PAD5:
- case FIVEKEY:
+ /* fall-through */
+ case PAD5: case FIVEKEY:
Val += 1.0f;
- case PAD4:
- case FOURKEY:
+ /* fall-through */
+ case PAD4: case FOURKEY:
Val += 1.0f;
- case PAD3:
- case THREEKEY:
+ /* fall-through */
+ case PAD3: case THREEKEY:
Val += 1.0f;
- case PAD2:
- case TWOKEY:
+ /* fall-through */
+ case PAD2: case TWOKEY:
Val += 1.0f;
- case PAD1:
- case ONEKEY:
+ /* fall-through */
+ case PAD1: case ONEKEY:
Val += 1.0f;
- case PAD0:
- case ZEROKEY:
+ /* fall-through */
+ case PAD0: case ZEROKEY:
if (!n->ctrl[idx])
n->ctrl[idx] = 1;
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c
index 822f495d5bc..1500f4282e5 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.c
+++ b/source/blender/imbuf/intern/cineon/logImageCore.c
@@ -1470,6 +1470,7 @@ static int convertRGBAToLogElement(float *src, float *dst, LogImageFile *logImag
case descriptor_YA: /* this descriptor is for internal use only */
default:
rvalue = 1;
+ break;
}
if (srcIsLinearRGB != 0) {
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index baaee8cb553..238e68b141c 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -1094,6 +1094,7 @@ const char *IMB_colormanagement_role_colorspace_name_get(int role)
default:
printf("Unknown role was passed to %s\n", __func__);
BLI_assert(0);
+ break;
}
return NULL;
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index ed4f6d40cee..38caf224c42 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -366,6 +366,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla
rect[0] = r;
rect += 4;
}
+ break;
}
}
@@ -549,7 +550,8 @@ next_stamp_info:
break;
/* default was missing... intentional ? */
default:
- ; /* do nothing */
+ /* do nothing */
+ break;
}
jpeg_write_scanlines(cinfo, row_pointer, 1);
@@ -594,7 +596,8 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I
break;
/* default was missing... intentional ? */
default:
- ; /* do nothing */
+ /* do nothing */
+ break;
}
jpeg_set_defaults(cinfo);
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index e07eef1868e..b620dbd9b10 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -567,6 +567,7 @@ ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags, char colorspace[I
default:
printf("PNG format not supported\n");
longjmp(png_jmpbuf(png_ptr), 1);
+ break;
}
ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0);
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 0688eb81ff2..8d69d79d847 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -184,9 +184,8 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
}
default:
{
- fprintf(stderr,
- "%s:%d: unhandeld value in switch statement: %d\n",
- __FILE__, __LINE__, node->custom1);
+ BLI_assert(0);
+ break;
}
}
}
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c
index 7ac4dd5d0b7..6c7fc686cc0 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.c
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.c
@@ -507,6 +507,7 @@ static int bpy_slot_from_py(BMesh *bm, BMOperator *bmop, BMOpSlot *slot, PyObjec
return -1;
}
}
+ /* fall-through */
}
default:
/* TODO --- many others */
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 76e64ebba6e..008a7e7f944 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -704,6 +704,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
ret = col_cb; /* return the color instead */
}
}
+ break;
default:
break;
}
@@ -776,7 +777,8 @@ static PyObject *pyrna_struct_richcmp(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
@@ -805,7 +807,8 @@ static PyObject *pyrna_prop_richcmp(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
@@ -2380,6 +2383,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po
PyErr_SetString(PyExc_TypeError, "not an array type");
Py_DECREF(tuple);
tuple = NULL;
+ break;
}
}
return tuple;
@@ -2719,6 +2723,7 @@ static int prop_subscript_ass_array_slice(PointerRNA *ptr, PropertyRNA *prop,
default:
PyErr_SetString(PyExc_TypeError, "not an array type");
ret = -1;
+ break;
}
Py_DECREF(value);
@@ -3588,6 +3593,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
"bpy_struct: Context type invalid %d, can't get \"%.200s\" from context",
newtype, name);
ret = NULL;
+ break;
}
}
else if (done == -1) { /* found but not set */
@@ -4863,13 +4869,13 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat
ret = Matrix_CreatePyObject(data, 3, 3, Py_NEW, NULL);
break;
}
- /* pass through */
+ /* fall-through */
#endif
default:
ret = PyTuple_New(len);
for (a = 0; a < len; a++)
PyTuple_SET_ITEM(ret, a, PyFloat_FromDouble(((float *)data)[a]));
-
+ break;
}
break;
default:
@@ -7001,21 +7007,23 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
/* Sneaky workaround to use the class name as the bl_idname */
#define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \
- (STREQ(identifier, rna_attr)) { \
- item = PyObject_GetAttr(py_class, py_attr); \
- if (item && item != Py_None) { \
- if (pyrna_py_to_prop(dummyptr, prop, NULL, \
- item, "validating class:") != 0) \
- { \
- Py_DECREF(item); \
- return -1; \
- } \
- } \
- Py_XDECREF(item); \
- } /* intentionally allow else here */
-
- if BPY_REPLACEMENT_STRING("bl_idname", bpy_intern_str___name__)
- else if BPY_REPLACEMENT_STRING("bl_description", bpy_intern_str___doc__)
+ else if (STREQ(identifier, rna_attr)) { \
+ if ((item = PyObject_GetAttr(py_class, py_attr))) { \
+ if (item != Py_None) { \
+ if (pyrna_py_to_prop(dummyptr, prop, NULL, \
+ item, "validating class:") != 0) \
+ { \
+ Py_DECREF(item); \
+ return -1; \
+ } \
+ } \
+ Py_DECREF(item); \
+ } \
+ } /* intentionally allow else here */
+
+ if (false) {} /* needed for macro */
+ BPY_REPLACEMENT_STRING("bl_idname", bpy_intern_str___name__)
+ BPY_REPLACEMENT_STRING("bl_description", bpy_intern_str___doc__)
#undef BPY_REPLACEMENT_STRING
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c
index b8907e797ef..bb40a21eed9 100644
--- a/source/blender/python/intern/bpy_rna_array.c
+++ b/source/blender/python/intern/bpy_rna_array.c
@@ -580,6 +580,7 @@ int pyrna_py_to_array(PointerRNA *ptr, PropertyRNA *prop, char *param_data,
default:
PyErr_SetString(PyExc_TypeError, "not an array type");
ret = -1;
+ break;
}
return ret;
@@ -605,6 +606,7 @@ int pyrna_py_to_array_index(PointerRNA *ptr, PropertyRNA *prop, int arraydim, in
default:
PyErr_SetString(PyExc_TypeError, "not an array type");
ret = -1;
+ break;
}
return ret;
@@ -627,6 +629,7 @@ PyObject *pyrna_array_index(PointerRNA *ptr, PropertyRNA *prop, int index)
default:
PyErr_SetString(PyExc_TypeError, "not an array type");
item = NULL;
+ break;
}
return item;
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index ae5b381cf59..9c3edec108a 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -170,7 +170,8 @@ static PyObject *Color_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 517fd9045e5..6bb3031f0a3 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -64,7 +64,7 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
case 2:
if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1)
return NULL;
- /* intentionally pass through */
+ /* fall-through */
case 1:
if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1)
return NULL;
@@ -356,7 +356,8 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 26793139227..d471cd05a2b 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -371,6 +371,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
}
}
+ break;
}
}
@@ -1752,7 +1753,8 @@ static PyObject *Matrix_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index a3f6b3f7c79..b0b818faaa0 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -529,7 +529,8 @@ static PyObject *Quaternion_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index ab83a11e797..8509c46b395 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -720,8 +720,8 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
return NULL;
}
else {
- short use_a = TRUE;
- short use_b = TRUE;
+ bool use_a = true;
+ bool use_b = true;
float lambda;
PyObject *ret = PyTuple_New(2);
@@ -729,15 +729,16 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
switch (isect_line_sphere_v3(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
- use_b = FALSE;
+ use_b = false;
break;
case 2:
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = FALSE;
break;
default:
- use_a = FALSE;
- use_b = FALSE;
+ use_a = false;
+ use_b = false;
+ break;
}
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 3, Py_NEW, NULL)); }
@@ -811,6 +812,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject *UNUSED(self), PyO
default:
use_a = false;
use_b = false;
+ break;
}
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 2, Py_NEW, NULL)); }
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 0a00da00cea..f8546ad441a 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1116,6 +1116,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
break;
default:
event = NULL;
+ break;
}
switch (context) {
@@ -1362,40 +1363,17 @@ int WM_userdef_event_map(int kmitype)
{
switch (kmitype) {
case SELECTMOUSE:
- if (U.flag & USER_LMOUSESELECT)
- return LEFTMOUSE;
- else
- return RIGHTMOUSE;
-
+ return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
case ACTIONMOUSE:
- if (U.flag & USER_LMOUSESELECT)
- return RIGHTMOUSE;
- else
- return LEFTMOUSE;
-
- case WHEELOUTMOUSE:
- if (U.uiflag & USER_WHEELZOOMDIR)
- return WHEELUPMOUSE;
- else
- return WHEELDOWNMOUSE;
-
- case WHEELINMOUSE:
- if (U.uiflag & USER_WHEELZOOMDIR)
- return WHEELDOWNMOUSE;
- else
- return WHEELUPMOUSE;
-
+ return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
case EVT_TWEAK_A:
- if (U.flag & USER_LMOUSESELECT)
- return EVT_TWEAK_R;
- else
- return EVT_TWEAK_L;
-
+ return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_R : EVT_TWEAK_L;
case EVT_TWEAK_S:
- if (U.flag & USER_LMOUSESELECT)
- return EVT_TWEAK_L;
- else
- return EVT_TWEAK_R;
+ return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_L : EVT_TWEAK_R;
+ case WHEELOUTMOUSE:
+ return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELUPMOUSE : WHEELDOWNMOUSE;
+ case WHEELINMOUSE:
+ return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELDOWNMOUSE : WHEELUPMOUSE;
}
return kmitype;
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp
index 24323f91c3e..247f4173d1d 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.cpp
+++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp
@@ -404,7 +404,8 @@ static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;