corrected more issues from [#31069] Analyzing the Blender project with PVS-Studio

This commit is contained in:
Campbell Barton 2012-04-23 16:29:13 +00:00
parent bfcdd45245
commit b8c4c54ff0
4 changed files with 18 additions and 19 deletions

@ -1577,14 +1577,14 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
if (pmd->canvas && !(pmd->canvas->flags & MOD_DPAINT_BAKING)) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
DynamicPaintSurface *surface;
int update_normals = 0;
/* loop through surfaces */
for (; surface; surface=surface->next) {
for (surface = pmd->canvas->surfaces.first; surface; surface=surface->next) {
PaintSurfaceData *sData = surface->data;
if (surface && surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && sData) {
if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && sData) {
if (!(surface->flags & (MOD_DPAINT_ACTIVE))) continue;
/* process vertex surface previews */

@ -1105,20 +1105,18 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
/* get the group to use */
agrp= action_groups_find_named(&tmp_act, grpname);
/* no matching group, so add one */
if (agrp == NULL) {
/* no matching group, so add one */
if (agrp == NULL) {
/* Add a new group, and make it active */
agrp= MEM_callocN(sizeof(bActionGroup), "bActionGroup");
agrp->flag = AGRP_SELECTED;
if (muteipo) agrp->flag |= AGRP_MUTED;
BLI_strncpy(agrp->name, grpname, sizeof(agrp->name));
BLI_addtail(&tmp_act.groups, agrp);
BLI_uniquename(&tmp_act.groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
}
/* Add a new group, and make it active */
agrp= MEM_callocN(sizeof(bActionGroup), "bActionGroup");
agrp->flag = AGRP_SELECTED;
if (muteipo) agrp->flag |= AGRP_MUTED;
BLI_strncpy(agrp->name, grpname, sizeof(agrp->name));
BLI_addtail(&tmp_act.groups, agrp);
BLI_uniquename(&tmp_act.groups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
}
/* add F-Curve to group */

@ -98,7 +98,7 @@
static void star_stuff_init_func(void)
{
cpack(-1);
cpack(0xFFFFFF);
glPointSize(1.0);
glBegin(GL_POINTS);
}

@ -1782,9 +1782,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
hasize = ma->hasize;
/* XXX 'tpsys' is alwyas NULL, this code won't run! */
/* get orco */
if (tpsys && part->phystype==PART_PHYS_NO) {
tpa=tpsys->particles+pa->num;
if (tpsys && part->phystype == PART_PHYS_NO) {
tpa = tpsys->particles + pa->num;
psys_particle_on_emitter(psmd,tpart->from,tpa->num,pa->num_dmcache,tpa->fuv,tpa->foffset,co,nor,0,0,sd.orco,0);
}
else