diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 3ac0b8449b0..462ecebc10a 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -140,7 +140,7 @@ int BLF_load(const char *name) /* check if we already load this font. */ i= blf_search(name); if (i >= 0) { - font= global_font[i]; + /*font= global_font[i];*/ /*UNUSED*/ return(i); } @@ -225,7 +225,7 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size) i= blf_search(name); if (i >= 0) { - font= global_font[i]; + /*font= global_font[i];*/ /*UNUSED*/ return(i); } diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 674836ac859..424d15f6a7e 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1795,7 +1795,6 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba dl->rt= nu->flag & ~CU_2D; dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "bevelSplitFlag"); - bevp= (BevPoint *)(bl+1); /* for each point of poly make a bevel piece */ bevp= (BevPoint *)(bl+1); diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index ecaa15c8f7d..9684e18b949 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -696,7 +696,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode) // Create unicode string utf8len = utf8slen(cu->str); - tmp = mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem"); + mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem"); utf8towchar(mem, cu->str); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 58e3b4ba552..d8876705ebb 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -914,10 +914,10 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix) } if (scene->r.stamp & R_STAMP_TIME) { - int h, m, s, f; - h= m= s= f= 0; - f = (int)(scene->r.cfra % scene->r.frs_sec); - s = (int)(scene->r.cfra / scene->r.frs_sec); + int f = (int)(scene->r.cfra % scene->r.frs_sec); + int s = (int)(scene->r.cfra / scene->r.frs_sec); + int h= 0; + int m= 0; if (s) { m = (int)(s / 60); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 0df456a443d..fc9c41070dc 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1229,7 +1229,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float vel[3]; float k = 0.0f; float L = s->restlen; - float cb = clmd->sim_parms->structural; + float cb; /* = clmd->sim_parms->structural; */ /*UNUSED*/ float nullf[3] = {0,0,0}; float stretch_force[3] = {0,0,0}; @@ -1566,7 +1566,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec float tm2[3][3] = {{0}}; MFace *mfaces = cloth->mfaces; unsigned int numverts = cloth->numverts; - LinkNode *search = cloth->springs; + LinkNode *search; lfVector *winvec; EffectedPoint epoint; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index db826b83864..7c3e90dc375 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2847,7 +2847,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) ParticleEditSettings *pset = &sim->scene->toolsettings->particle; ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; - ParticleCacheKey *ca, **cache= psys->pathcache; + ParticleCacheKey *ca, **cache; DerivedMesh *hair_dm = (psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) ? psys->hair_out_dm : NULL; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 37ce6c94eb7..0044c86f4f7 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2025,8 +2025,6 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) PTCacheMem *pm= pid->cache->mem_cache.first; PTCacheMem *link= NULL; - pm= pid->cache->mem_cache.first; - if(mode == PTCACHE_CLEAR_ALL) { /*we want startframe if the cache starts before zero*/ pid->cache->last_exact = MIN2(pid->cache->startframe, 0); @@ -2207,8 +2205,6 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra else { PTCacheMem *pm= pid->cache->mem_cache.first; - pm= pid->cache->mem_cache.first; - while(pm) { if(pm->frame >= sta && pm->frame <= end) cache->cached_frames[pm->frame-sta] = 1; diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index a96b2d20976..e187595aa11 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -410,7 +410,7 @@ int BLI_isGraphCyclic(BGraph *graph) BArc * BLI_findConnectedArc(BGraph *graph, BArc *arc, BNode *v) { - BArc *nextArc = arc->next; + BArc *nextArc; for(nextArc = graph->arcs.first; nextArc; nextArc = nextArc->next) { diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index e9d0645ceba..d4f25c10e30 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -1691,7 +1691,7 @@ void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level void generateMissingArcs(RigGraph *rigg) { - ReebGraph *reebg = rigg->link_mesh; + ReebGraph *reebg; int multi_level_limit = 5; for (reebg = rigg->link_mesh; reebg; reebg = reebg->link_up) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 73db7b1a377..ce4a61b5cff 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -2194,7 +2194,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) /* loop over selection segments of a curve, smooth each */ /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ - start_sel = end_sel = -1; + start_sel = -1; for(bezt=nu->bezt+last_sel, a=last_sel; apntsu; a++, bezt++) { if(bezt->f2 & SELECT) { start_sel = a; @@ -2256,7 +2256,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) /* loop over selection segments of a curve, smooth each */ /* Start BezTriple code, this is duplicated below for points, make sure these functions stay in sync */ - start_sel = end_sel = -1; + start_sel = -1; for(bp=nu->bp+last_sel, a=last_sel; apntsu; a++, bp++) { if(bp->f1 & SELECT) { start_sel = a; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index f719d41e7b6..ffb18bcad4d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3461,7 +3461,7 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt if(event->type==LEFTMOUSE && event->val==KM_PRESS) { CurveMapping *cumap= (CurveMapping*)but->poin; CurveMap *cuma= cumap->cm+cumap->cur; - CurveMapPoint *cmp= cuma->curve; + CurveMapPoint *cmp; float fx, fy, zoomx, zoomy, offsx, offsy; float dist, mindist= 200.0f; // 14 pixels radius int sel= -1; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 69e866d9c1c..1f25f968213 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2334,7 +2334,6 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) void uiTemplateRunningJobs(uiLayout *layout, bContext *C) { bScreen *screen= CTX_wm_screen(C); - Scene *scene= CTX_data_scene(C); wmWindowManager *wm= CTX_wm_manager(C); ScrArea *sa= CTX_wm_area(C); uiBlock *block; @@ -2352,6 +2351,7 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) handle_event= B_STOPCOMPO; } else { + Scene *scene; /* another scene can be rendering too, for example via compositor */ for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) if(WM_jobs_test(wm, scene)) diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index b2f74e435b1..5e3a0c6022a 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -466,7 +466,7 @@ static void ui_theme_init_new(bTheme *btheme) */ void ui_theme_init_default(void) { - bTheme *btheme= U.themes.first; + bTheme *btheme; /* we search for the theme with name Default */ for(btheme= U.themes.first; btheme; btheme= btheme->next) { diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 1f70dd84d94..3647d32c28d 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -86,8 +86,6 @@ void make_editLatt(Object *obedit) free_editLatt(obedit); - lt= obedit->data; - actkey= ob_get_keyblock(obedit); if(actkey) key_to_latt(actkey, lt); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ab53a95a156..a0d8e3c9733 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1338,8 +1338,6 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""}, {0, NULL, 0, NULL, NULL}}; - PropertyRNA *prop; - /* identifiers */ ot->name= "Link Data"; ot->description = "Make links from the active object to other selected objects"; @@ -1353,7 +1351,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); + ot->prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); } @@ -1464,7 +1462,8 @@ void single_obdata_users(Main *bmain, Scene *scene, int flag) ob->data= copy_camera(ob->data); break; case OB_MESH: - me= ob->data= copy_mesh(ob->data); + ob->data= copy_mesh(ob->data); + //me= ob->data; //if(me && me->key) // ipo_idnew(me->key->ipo); /* drivers */ break; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 82c2f614af1..6f4f996d004 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -639,9 +639,8 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float } } else { - xi = (int)((uv[0]*ibuf->x) + 0.5f); - yi = (int)((uv[1]*ibuf->y) + 0.5f); - + //xi = (int)((uv[0]*ibuf->x) + 0.5f); + //yi = (int)((uv[1]*ibuf->y) + 0.5f); //if (xi<0 || xi>=ibuf->x || yi<0 || yi>=ibuf->y) return 0; /* wrap */ diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index a62f01e88f0..832d657428c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1430,7 +1430,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P Object *ob; Mesh *me; float mat[4][4]; - float paintweight= ts->vgroup_weight; + float paintweight; int *indexar; int totindex, index, totw, flip; float alpha; diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 825b462c08f..4719c10e941 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -442,7 +442,6 @@ static void insert_action_keys(bAnimContext *ac, short mode) ReportList *reports = ac->reports; Scene *scene= ac->scene; - float cfra= (float)CFRA; short flag = 0; /* filter data */ @@ -459,7 +458,8 @@ static void insert_action_keys(bAnimContext *ac, short mode) for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; - + float cfra; + /* adjust current frame for NLA-scaling */ if (adt) cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP); diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 84090c88abc..98547dbe798 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -280,12 +280,12 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, { uiBut *but; float x,y; - float alpha=1.0f; + /*float alpha=1.0f;*/ x = (float)(sx); y = (float)(sy-height); - if (icon == ICON_FILE_BLANK) alpha = 0.375f; + /*if (icon == ICON_FILE_BLANK) alpha = 0.375f;*/ but= uiDefIconBut(block, LABEL, 0, icon, x, y, width, height, NULL, 0.0, 0.0, 0, 0, ""); uiButSetDragPath(but, path); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 154c955c48e..fe9296b7227 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -410,7 +410,6 @@ static void insert_graph_keys(bAnimContext *ac, short mode) ReportList *reports = ac->reports; Scene *scene= ac->scene; - float cfra= (float)CFRA; short flag = 0; /* filter data */ @@ -426,6 +425,7 @@ static void insert_graph_keys(bAnimContext *ac, short mode) for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; + float cfra; /* adjust current frame for NLA-mapping */ if (adt) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 69bbfb78d81..d1230d82f71 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -438,7 +438,6 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceImage *sima; ARegion *ar; - Scene *scene; Object *obedit; float aspx, aspy, zoomx, zoomy, w, h; int width, height; @@ -446,7 +445,6 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) /* retrieve state */ sima= CTX_wm_space_image(C); ar= CTX_wm_region(C); - scene= (Scene*)CTX_data_scene(C); obedit= CTX_data_edit_object(C); ED_space_image_size(sima, &width, &height); @@ -2030,7 +2028,7 @@ static int record_composite_exec(bContext *C, wmOperator *op) static int record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - RecordCompositeData *rcd= op->customdata; + RecordCompositeData *rcd; if(!record_composite_init(C, op)) return OPERATOR_CANCELLED; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index c911adb0c16..af4e496f68a 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -586,13 +586,13 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) MTFace *tf; if(em && EM_texFaceCheck(em)) { - sima->image= ima= NULL; + sima->image= NULL; tf = EM_get_active_mtface(em, NULL, NULL, 1); /* partially selected face is ok */ if(tf && (tf->mode & TF_TEX)) { /* don't need to check for pin here, see above */ - sima->image= ima= tf->tpage; + sima->image= tf->tpage; if(sima->flag & SI_EDITTILE); else sima->curtile= tf->tile; diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index eb7ae1d8011..ad54eff1fd4 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -201,7 +201,6 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) Sequence *seq; /* generic strip vars */ Strip *strip; - StripElem *se; int start_frame, channel; /* operator props */ @@ -227,7 +226,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) strip->len = seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1; strip->us= 1; - strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); + strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); strcpy(seq->name+2, sce_seq->id.name+2); seqbase_unique_name_recursive(&ed->seqbase, seq); @@ -559,7 +558,6 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) Sequence *seq; /* generic strip vars */ Strip *strip; - StripElem *se; struct SeqEffectHandle sh; int start_frame, end_frame, channel, type; /* operator props */ @@ -614,7 +612,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) strip->len = seq->len; strip->us= 1; if(seq->len>0) - strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); + strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); if (seq->type==SEQ_PLUGIN) { char path[FILE_MAX]; diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 318c64f87a7..eb69374b5b7 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1029,10 +1029,8 @@ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top) Text *text= st->text; TextLine* pline= text->lines.first; int i= st->top, lineno= 0; - DrawCache *drawcache; text_update_drawcache(st, ar); - drawcache= (DrawCache *)st->drawcache; if(wrap_top) *wrap_top= 0; diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 18a83e16ca1..901aaba2cb1 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -630,15 +630,15 @@ static float co[16] ={ /* smat, imat = mat & imat to draw screenaligned */ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel *pchan, EditBone *ebone) { - float head, tail, length, dist; + float head, tail, dist /*, length*/; float *headvec, *tailvec, dirvec[3]; /* figure out the sizes of spheres */ if (ebone) { /* this routine doesn't call get_matrix_editbone() that calculates it */ ebone->length = len_v3v3(ebone->head, ebone->tail); - - length= ebone->length; + + /*length= ebone->length;*/ /*UNUSED*/ tail= ebone->rad_tail; dist= ebone->dist; if (ebone->parent && (ebone->flag & BONE_CONNECTED)) @@ -649,7 +649,7 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel tailvec= ebone->tail; } else { - length= pchan->bone->length; + /*length= pchan->bone->length;*/ /*UNUSED*/ tail= pchan->bone->rad_tail; dist= pchan->bone->dist; if (pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index c6cbfe44df4..caac8d1d9fe 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -93,13 +93,10 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me) EdgeHash *eh = BLI_edgehash_new(); int i; MFace *mf; - MTFace *tf = NULL; for (i=0; itotface; i++) { mf = &me->mface[i]; - if (me->mtface) - tf = &me->mtface[i]; - + if (mf->v3) { if (!(mf->flag&ME_HIDE)) { unsigned int flags = eEdge_Visible; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 19353e9f29e..26445c4d742 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3448,7 +3448,6 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int ob_dt) { Object *ob=base->object; - ParticleSystemModifierData *psmd; ParticleEditSettings *pset = PE_settings(scene); ParticleSettings *part; ParticleData *pars, *pa; @@ -3460,7 +3459,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv float vel[3], imat[4][4]; float timestep, pixsize=1.0, pa_size, r_tilt, r_length; float pa_time, pa_birthtime, pa_dietime, pa_health; - float cfra= bsystem_time(scene, ob,(float)CFRA,0.0); + float cfra; float ma_r=0.0f, ma_g=0.0f, ma_b=0.0f; int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0; int select=ob->flag&SELECT, create_cdata=0, need_v=0; @@ -3496,7 +3495,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv sim.scene= scene; sim.ob= ob; sim.psys= psys; - sim.psmd = psmd = psys_get_modifier(ob,psys); + sim.psmd = psys_get_modifier(ob,psys); if(part->phystype==PART_PHYS_KEYED){ if(psys->flag&PSYS_KEYED){ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 35cddda5362..4eeacd6f05f 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2314,20 +2314,21 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) /* ***** remove image operator ******* */ static int background_image_remove_exec(bContext *C, wmOperator *op) { - BGpic *bgpic_rem = CTX_data_pointer_get_type(C, "bgpic", &RNA_BackgroundImage).data; View3D *vd = CTX_wm_view3d(C); int index = RNA_int_get(op->ptr, "index"); + BGpic *bgpic_rem= BLI_findlink(&vd->bgpicbase, index); - bgpic_rem = BLI_findlink(&vd->bgpicbase, index); if(bgpic_rem) { BLI_remlink(&vd->bgpicbase, bgpic_rem); if(bgpic_rem->ima) bgpic_rem->ima->id.us--; MEM_freeN(bgpic_rem); + WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, vd); + return OPERATOR_FINISHED; + } + else { + return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, vd); - - return OPERATOR_FINISHED; } void VIEW3D_OT_background_image_remove(wmOperatorType *ot) diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index a259e29e9a0..2f7a24d600f 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1743,7 +1743,6 @@ int ED_view3d_context_activate(bContext *C) bScreen *sc= CTX_wm_screen(C); ScrArea *sa= CTX_wm_area(C); ARegion *ar; - RegionView3D *rv3d; /* sa can be NULL when called from python */ if(sa==NULL || sa->spacetype != SPACE_VIEW3D) @@ -1764,7 +1763,6 @@ int ED_view3d_context_activate(bContext *C) // bad context switch .. CTX_wm_area_set(C, sa); CTX_wm_region_set(C, ar); - rv3d= ar->regiondata; return 1; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 65e58d8a608..23f4f103eae 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4849,18 +4849,16 @@ int doEdgeSlide(TransInfo *t, float perc) LinkNode *vertlist=sld->vertlist, *look; GHash *vertgh = sld->vhash; TransDataSlideVert *tempsv; - float len = 0.0f; + float len; int prop=1, flip=0; /* UV correction vars */ GHash **uvarray= sld->uvhash; int uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE); int uvlay_idx; - TransDataSlideUv *suv=sld->slideuv; + TransDataSlideUv *suv; float uv_tmp[2]; LinkNode *fuv_link; - len = 0.0f; - tempsv = BLI_ghash_lookup(vertgh,nearest); centerVert = editedge_getSharedVert(tempsv->up, tempsv->down); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 55699a345c2..3047df06523 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -838,39 +838,38 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac switch(spaceid) { case SPACE_VIEW3D: - km = WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_WARP, WKEY, KM_PRESS, KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_WARP, WKEY, KM_PRESS, KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, OP_TOSPHERE, SKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_TOSPHERE, SKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, OP_SHEAR, SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0); + WM_keymap_add_item(keymap, OP_SHEAR, SKEY, KM_PRESS, KM_ALT|KM_CTRL|KM_SHIFT, 0); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); + WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); km = WM_keymap_add_item(keymap, "TRANSFORM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); RNA_boolean_set(km->ptr, "use", 1); - km = WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(km->ptr, "data_path", "tool_settings.use_snap"); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - + WM_keymap_add_item(keymap, "TRANSFORM_OT_snap_type", TABKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + km = WM_keymap_add_item(keymap, OP_TRANSLATION, TKEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(km->ptr, "texture_space", 1); - + km = WM_keymap_add_item(keymap, OP_RESIZE, TKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); RNA_boolean_set(km->ptr, "texture_space", 1); - break; case SPACE_ACTION: km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0); @@ -889,16 +888,16 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac RNA_int_set(km->ptr, "mode", TFM_TIME_SLIDE); break; case SPACE_IPO: - km= WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0); RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); break; case SPACE_NLA: km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", GKEY, KM_PRESS, 0, 0); @@ -914,35 +913,35 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac RNA_int_set(km->ptr, "mode", TFM_TIME_SCALE); break; case SPACE_NODE: - km= WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0); RNA_enum_set(km->ptr, "release_confirm", 1); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); RNA_enum_set(km->ptr, "release_confirm", 1); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); break; case SPACE_SEQ: - km= WM_keymap_add_item(keymap, OP_SEQ_SLIDE, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_SEQ_SLIDE, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_SEQ_SLIDE, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_SEQ_SLIDE, EVT_TWEAK_S, KM_ANY, 0, 0); km= WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", EKEY, KM_PRESS, 0, 0); RNA_int_set(km->ptr, "mode", TFM_TIME_EXTEND); break; case SPACE_IMAGE: - km = WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); - km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); - km = WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0); - km = WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); + WM_keymap_add_item(keymap, "TRANSFORM_OT_mirror", MKEY, KM_PRESS, KM_CTRL, 0); km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0); RNA_string_set(km->ptr, "data_path", "tool_settings.use_snap"); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2c6870f20c0..fb3758d2b0b 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -290,7 +290,7 @@ TransformOrientation* addMatrixSpace(bContext *C, float mat[3][3], char name[], void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; - TransformOrientation *ts = transform_spaces->first; + TransformOrientation *ts; int i; for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { @@ -341,7 +341,7 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) { void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) { ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces; View3D *v3d = CTX_wm_view3d(C); - TransformOrientation *ts = transform_spaces->first; + TransformOrientation *ts; int i; for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) { diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index fc217411386..98c71407631 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -426,7 +426,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) DerivedMesh *finaldm, *cagedm; unsigned char col1[4], col2[4]; float pointsize; - int drawfaces, interpedges, lastsel, sel; + int drawfaces, interpedges; Image *ima= sima->image; em= BKE_mesh_get_editmesh(me); @@ -627,8 +627,8 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) glColor4ubv((unsigned char *)col2); if(me->drawflag & ME_DRAWEDGES) { + int lastsel= 0, sel; UI_GetThemeColor4ubv(TH_VERTEX_SELECT, col1); - lastsel = sel = 0; if(interpedges) { glShadeModel(GL_SMOOTH); diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 1ea11432025..9e2c32765d2 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -228,13 +228,9 @@ static void imb_float_from_rect_linear(struct ImBuf *ibuf, float *fbuf) void IMB_float_from_rect(struct ImBuf *ibuf) { /* quick method to convert byte to floatbuf */ - float *tof = ibuf->rect_float; - - unsigned char *to = (unsigned char *) ibuf->rect; - if(to==NULL) return; - if(tof==NULL) { + if(ibuf->rect==NULL) return; + if(ibuf->rect_float==NULL) { if (imb_addrectfloatImBuf(ibuf) == 0) return; - tof = ibuf->rect_float; } /* Float bufs should be stored linear */ diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index 4ec6e82a7dd..2edfee7e6e4 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -85,7 +85,7 @@ static void deformVerts(ModifierData *md, Object *ob, int UNUSED(isFinalCalc)) { SmokeModifierData *smd = (SmokeModifierData*) md; - DerivedMesh *dm = dm= get_cddm(ob, NULL, derivedData, vertexCos); + DerivedMesh *dm = get_cddm(ob, NULL, derivedData, vertexCos); smokeModifier_do(smd, md->scene, ob, dm); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 0b88f0f42bf..31cb3172013 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -118,7 +118,7 @@ static void write_history(void); */ static void wm_window_match_init(bContext *C, ListBase *wmlist) { - wmWindowManager *wm= G.main->wm.first; + wmWindowManager *wm; wmWindow *win, *active_win; *wmlist= G.main->wm; diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 3c27a71537b..0398f44a8c9 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -277,7 +277,6 @@ static void wm_gesture_draw_lasso(wmGesture *gt) glColor3ub(96, 96, 96); glLineStipple(1, 0xAAAA); glBegin(GL_LINE_STRIP); - lasso= (short *)gt->customdata; for(i=0; ipoints; i++, lasso+=2) glVertex2sv(lasso); if(gt->type==WM_GESTURE_LASSO)