diff options
Diffstat (limited to 'source')
23 files changed, 37 insertions, 48 deletions
diff --git a/source/blender/blenkernel/BKE_ccg.h b/source/blender/blenkernel/BKE_ccg.h index 6d39d42bde5..fb6211504ae 100644 --- a/source/blender/blenkernel/BKE_ccg.h +++ b/source/blender/blenkernel/BKE_ccg.h @@ -126,7 +126,7 @@ BLI_INLINE CCGElem *CCG_elem_offset(const CCGKey *key, CCGElem *elem, int offset BLI_INLINE CCGElem *CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y) { - BLI_assert(x < key->grid_size && y < key->grid_size); +// BLI_assert(x < key->grid_size && y < key->grid_size); return CCG_elem_offset(key, elem, (y * key->grid_size + x)); } diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 4eb26e81ae2..ddb4cc4391a 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1154,10 +1154,6 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa if (ob->type != OB_MBALL) ob->flag |= OB_DONE; /* doesnt render */ for (a = 0, mp = mpoly; a < totface; a++, mp++) { - int mv1; - int mv2; - int mv3; - /* int mv4; */ /* UNUSED */ float *v1; float *v2; float *v3; @@ -1171,9 +1167,9 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa } else { BKE_mesh_calc_poly_normal(mp, mloop + mp->loopstart, mvert, f_no); - v1 = mvert[(mv1 = loopstart[0].v)].co; - v2 = mvert[(mv2 = loopstart[1].v)].co; - v3 = mvert[(mv3 = loopstart[2].v)].co; + v1 = mvert[loopstart[0].v].co; + v2 = mvert[loopstart[1].v].co; + v3 = mvert[loopstart[2].v].co; } /* translation */ diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 480814a28c3..ffe6a312ef8 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1596,7 +1596,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected } else if (pchan->bone->layer & layer_protected) { ListBase proxylocal_constraints = {NULL, NULL}; - bPoseChannel pchanw = {NULL}; + bPoseChannel pchanw; /* copy posechannel to temp, but restore important pointers */ pchanw = *pchanp; diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c index e82a2a53b7d..78da4f5b1c2 100644 --- a/source/blender/blenkernel/intern/bmfont.c +++ b/source/blender/blenkernel/intern/bmfont.c @@ -198,7 +198,7 @@ void detectBitmapFont(ImBuf *ibuf) readBitmapFontVersion0(ibuf, rect, 4); } else { - printf("detectBitmapFont :Unsupported version %d\n", version); + printf("detectBitmapFont :Unsupported version %d\n", (int)version); } /* on succes ibuf->userdata points to the bitmapfont */ diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 925040940f8..72284130869 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1501,7 +1501,7 @@ static void add_cube(PROCESS *mbproc, int i, int j, int k, int count) static void find_first_points(PROCESS *mbproc, MetaBall *mb, int a) { MetaElem *ml; - float f = 0.0f; + float f; ml = G_mb.mainb[a]; f = 1.0f - (mb->thresh / ml->s); diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c index 3bf5f863557..1d662ae3116 100644 --- a/source/blender/blenkernel/intern/navmesh_conversion.c +++ b/source/blender/blenkernel/intern/navmesh_conversion.c @@ -436,7 +436,7 @@ int buildNavMeshDataByDerivedMesh(DerivedMesh *dm, int *vertsPerPoly, unsigned short **polys, int **dtrisToPolysMap, int **dtrisToTrisMap, int **trisToFacesMap) { - int res = 1; + int res; int ntris = 0, *recastData = NULL; unsigned short *tris = NULL; diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index bb4a3762de1..0ca73b92071 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -496,7 +496,7 @@ static int check_mask_half(BMesh *bm, BMVert *v) const float *mask; mask = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_PAINT_MASK); - return ((*mask) < 0.5); + return ((*mask) < 0.5f); } static void edge_queue_insert(EdgeQueue *q, BLI_mempool *pool, BMEdge *e, diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 335e80eac15..928ec17999e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -378,7 +378,7 @@ static void *oldnewmap_liblookup(OldNewMap *onm, void *addr, void *lib) for (i = 0, entry = onm->entries; i < nentries; i++, entry++) { if (entry->old == addr) { - ID *id = id = entry->newp; + ID *id = entry->newp; if (id && (!lib || id->lib)) { return id; } diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index cb37e6ce4fe..a11d45a7a5a 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -1700,8 +1700,8 @@ BMEdge *bmesh_jekv(BMesh *bm, BMEdge *e_kill, BMVert *v_kill, const bool check_e BMFace *bmesh_jfke(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e) { BMLoop *l_iter, *l_f1 = NULL, *l_f2 = NULL; - int newlen = 0, i, f1len = 0, f2len = 0, edok; - + int newlen = 0, i, f1len = 0, f2len = 0; + bool edok; /* can't join a face to itself */ if (f1 == f2) { return NULL; diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index 311fe646125..6b91d5fded9 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -84,7 +84,6 @@ static void delete_void_pointer(void *data) { if (data) { MEM_freeN(data); - data = NULL; } } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 3ca400e1759..12a6343c7e7 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3154,9 +3154,6 @@ static bool ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, BLI_rctf_clamp_pt_v(&but->rect, data->ungrab_mval); } #endif - if (is_horizontal == false) { - mx_fl = my_fl; - } /* done correcting mouse */ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 103c9a0c9e9..eeddd8c7a9a 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2140,10 +2140,10 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe uiLayoutRow(layout, TRUE); uiBlockSetNFunc(block, curvemap_buttons_update, MEM_dupallocN(cb), cumap); - bt = uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, - &cmp->x, bounds.xmin, bounds.xmax, 1, 5, ""); - bt = uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, - &cmp->y, bounds.ymin, bounds.ymax, 1, 5, ""); + uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, + &cmp->x, bounds.xmin, bounds.xmax, 1, 5, ""); + uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, + &cmp->y, bounds.ymin, bounds.ymax, 1, 5, ""); } /* black/white levels */ diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 533ae26cfac..8198e088e5a 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -499,16 +499,9 @@ static void edbm_tagged_loop_pairs_do_fill_faces(BMesh *bm, UnorderedLoopPair *u BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); } else { - if (v_shared == f_verts[0]) { - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[1]->e, l_iter), l_iter); - } - else { - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; - BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[1]->e, l_iter), l_iter); - } + BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; + BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[0]->e, l_iter), l_iter); l_iter = l_iter->next; + BM_elem_attrs_copy(bm, bm, BM_edge_other_loop(ulp->l_pair[1]->e, l_iter), l_iter); } } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index e38b92a8a4c..2bdcda1430d 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1478,7 +1478,7 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, MDeformWeight *ndw; MDeformWeight *odw; - float changed_sum = 0.0f; + // float changed_sum = 0.0f; // UNUSED char *change_status; @@ -1507,7 +1507,7 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, } else if (ndw->weight != odw->weight) { /* changed groups are handled here */ totchange += ndw->weight - odw->weight; - changed_sum += ndw->weight; + // changed_sum += ndw->weight; // UNUSED change_status[i] = 2; /* was altered already */ total_changed++; } /* unchanged, unlocked bone groups are handled here */ diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index fafb5378f69..2cc09ea2aa9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -379,7 +379,6 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) DerivedMesh *dm; SculptSession *ss = ob->sculpt; SculptUndoNode *unode; - MultiresModifierData *mmd; int update = FALSE, rebuild = FALSE; int need_mask = FALSE; @@ -450,7 +449,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) BKE_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, &rebuild); BKE_pbvh_update(ss->pbvh, PBVH_UpdateBB | PBVH_UpdateOriginalBB | PBVH_UpdateRedraw, NULL); - if ((mmd = sculpt_multires_active(scene, ob))) { + if (sculpt_multires_active(scene, ob)) { if (rebuild) multires_mark_as_modified(ob, MULTIRES_HIDDEN_MODIFIED); else diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 817d3807269..a51315d9a16 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -3258,7 +3258,7 @@ static int clean_tracks_exec(bContext *C, wmOperator *op) next = track->next; if ((track->flag & TRACK_HIDDEN) == 0 && (track->flag & TRACK_LOCKED) == 0) { - int ok = 1; + bool ok; ok = (is_track_clean(track, frames, action == TRACKING_CLEAN_DELETE_SEGMENT)) && (error == 0.0f || (track->flag & TRACK_HAS_BUNDLE) == 0 || track->error < error); diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c index d850153f16e..856124ab5cb 100644 --- a/source/blender/imbuf/intern/bmp.c +++ b/source/blender/imbuf/intern/bmp.c @@ -61,6 +61,7 @@ typedef struct BMPINFOHEADER { unsigned int biClrImportant; } BMPINFOHEADER; +#if 0 typedef struct BMPHEADER { unsigned short biType; unsigned int biSize; @@ -68,6 +69,7 @@ typedef struct BMPHEADER { unsigned short biRes2; unsigned int biOffBits; } BMPHEADER; +#endif #define BMP_FILEHEADER_SIZE 14 diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 05495b92b98..bf0e4187aa6 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -121,10 +121,12 @@ static void jpeg_error(j_common_ptr cinfo) * INPUT HANDLER FROM MEMORY *---------------------------------------------------------- */ +#if 0 typedef struct { unsigned char *buffer; int filled; } buffer_struct; +#endif typedef struct { struct jpeg_source_mgr pub; /* public fields */ diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 3a79ea09228..8b60d1a96df 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -121,7 +121,7 @@ static void blend_color_darken(char cp[3], const char cp1[3], const char cp2[3], } } -static void blend_color_erase_alpha(char cp[3], const char cp1[3], const char cp2[3], const int fac) +static void blend_color_erase_alpha(char cp[4], const char cp1[4], const char cp2[4], const int fac) { int temp = (cp1[3] - fac * cp2[3] / 255); @@ -131,7 +131,7 @@ static void blend_color_erase_alpha(char cp[3], const char cp1[3], const char cp cp[3] = (temp < 0) ? 0 : temp; } -static void blend_color_add_alpha(char cp[3], const char cp1[3], const char cp2[3], const int fac) +static void blend_color_add_alpha(char cp[4], const char cp1[4], const char cp2[4], const int fac) { int temp = (cp1[3] + fac * cp2[3] / 255); @@ -251,7 +251,7 @@ static void blend_color_darken_float(float cp[3], const float cp1[3], const floa blend_color_mix_float(cp, cp1, cp2, fac); } -static void blend_color_erase_alpha_float(float cp[3], const float cp1[3], const float cp2[3], const float fac) +static void blend_color_erase_alpha_float(float cp[4], const float cp1[4], const float cp2[4], const float fac) { cp[0] = cp1[0]; cp[1] = cp1[1]; @@ -261,7 +261,7 @@ static void blend_color_erase_alpha_float(float cp[3], const float cp1[3], const if (cp[3] < 0.0f) cp[3] = 0.0f; } -static void blend_color_add_alpha_float(float cp[3], const float cp1[3], const float cp2[3], const float fac) +static void blend_color_add_alpha_float(float cp[4], const float cp1[4], const float cp2[4], const float fac) { cp[0] = cp1[0]; cp[1] = cp1[1]; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 3ca2c364345..bc65b27be0c 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -338,7 +338,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, /* offset matrix */ float offset[4][4]; float final_offset[4][4]; - float tmp_mat[4][4]; float length = amd->length; int count = amd->count, maxVerts; int *indexMap = NULL; @@ -418,6 +417,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, unit_m4(final_offset); for (j = 0; j < count - 1; j++) { + float tmp_mat[4][4]; mult_m4_m4m4(tmp_mat, offset, final_offset); copy_m4_m4(final_offset, tmp_mat); } diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index b2ca1b0d79e..743cd1a829e 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -100,7 +100,6 @@ static void delete_void_pointer(void *data) { if (data) { MEM_freeN(data); - data = NULL; } } @@ -242,7 +241,7 @@ static CustomDataMask required_data_mask(Object *UNUSED(ob), ModifierData *md) static float average_area_quad_v3(float *v1, float *v2, float *v3, float *v4) { - float areaq = 0.0f; + float areaq; areaq = area_tri_v3(v1, v2, v3) + area_tri_v3(v1, v2, v4) + area_tri_v3(v1, v3, v4); return areaq / 2.0f; } diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h index 8e6d04ec9ba..f02b94be526 100644 --- a/source/blender/python/bmesh/bmesh_py_types.h +++ b/source/blender/python/bmesh/bmesh_py_types.h @@ -168,7 +168,7 @@ int BPy_BMElem_CheckHType(PyTypeObject *type, const char htype); char *BPy_BMElem_StringFromHType_ex(const char htype, char ret[32]); char *BPy_BMElem_StringFromHType(const char htype); -void bpy_bm_generic_invalidate(BPy_BMGeneric *self); +// void bpy_bm_generic_invalidate(BPy_BMGeneric *self); int bpy_bm_generic_valid_check(BPy_BMGeneric *self); int bpy_bm_generic_valid_check_source(BPy_BMGeneric *self, BMesh *bm_source, const char *error_prefix); diff --git a/source/tests/bl_run_operators.py b/source/tests/bl_run_operators.py index 0202f7c64fb..e6f1cc56eb0 100644 --- a/source/tests/bl_run_operators.py +++ b/source/tests/bl_run_operators.py @@ -139,7 +139,9 @@ if USE_ATTRSET: if subvalue == parent: continue - + # grr, recursive! + if prop == "point_caches": + continue subvalue_type = type(subvalue) yield value, prop, subvalue_type subvalue_id = getattr(subvalue, "id_data", Ellipsis) |