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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-23 20:29:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-23 20:29:13 +0400
commitb8c4c54ff0a0d2315b711612238192ca4c4562f5 (patch)
tree3888bc8092d2477ebe099a2320d2cbce01243d54 /source
parentbfcdd452455f5075cd3150623f513bb9f70e4876 (diff)
corrected more issues from [#31069] Analyzing the Blender project with PVS-Studio
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
-rw-r--r--source/blender/blenkernel/intern/ipo.c24
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/render/intern/source/convertblender.c5
4 files changed, 18 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 943c8a20990..9ce4d68eeed 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -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 */
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index c1b5d07de4a..2fd1d291363 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -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 */
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 95a9d58c36e..ec383e1dbdb 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -98,7 +98,7 @@
static void star_stuff_init_func(void)
{
- cpack(-1);
+ cpack(0xFFFFFF);
glPointSize(1.0);
glBegin(GL_POINTS);
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index ba8fd40db61..66ed0bd85a9 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -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