Code cleanup: fix some clang static checker warnings.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 22 Dec 2011 20:29:44 +0000 (20:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 22 Dec 2011 20:29:44 +0000 (20:29 +0000)
26 files changed:
intern/iksolver/intern/IK_Solver.cpp
intern/mikktspace/mikktspace.c
intern/opennl/intern/opennl.c
intern/opennl/superlu/get_perm_c.c
intern/opennl/superlu/scolumn_bmod.c
intern/opennl/superlu/strsv.c
intern/opennl/superlu/sutil.c
intern/opennl/superlu/util.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/tracking.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_material.c
source/blender/render/intern/raytrace/rayobject_octree.cpp
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/volumetric.c

index af49b07d064032711c36b5b0f885aae3a0ba593f..3876f26362c7c98d7efa0a2b75aa92fb52449237 100644 (file)
@@ -225,11 +225,12 @@ void IK_SetStiffness(IK_Segment *seg, IK_SegmentAxis axis, float stiffness)
 void IK_GetBasisChange(IK_Segment *seg, float basis_change[][3])
 {
        IK_QSegment *qseg = (IK_QSegment*)seg;
-       const MT_Matrix3x3& change = qseg->BasisChange();
 
        if (qseg->Translational() && qseg->Composite())
                qseg = qseg->Composite();
 
+       const MT_Matrix3x3& change = qseg->BasisChange();
+
        // convert from moto row major to blender column major
        basis_change[0][0] = (float)change[0][0];
        basis_change[1][0] = (float)change[0][1];
index ff857e82d8f7d3f2099b34cc8c925499998d1c2c..2036e601bcbb9b8274ae7d28410243c6ed38a47d 100644 (file)
@@ -1350,7 +1350,6 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
                for(s=0; s<iUniqueSubGroups; s++)
                        free(pUniSubGroups[s].pTriMembers);
                iUniqueTspaces += iUniqueSubGroups;
-               iUniqueSubGroups = 0;
        }
 
        // clean up
index c3fb7135fcbf3159c0a39ac42eeaad1200a740c7..20b4c0a66811083cf3d316cfa3961ddcccd4e4d6 100644 (file)
@@ -1137,7 +1137,7 @@ static NLboolean __nlInvert_SUPERLU(__NLContext *context) {
 
        /* SuperLU variables */
        SuperMatrix B;
-       NLint info;
+       NLint info = 0;
 
        for(j=0; j<context->nb_rhs; j++, b+=n, x+=n) {
                /* Create superlu array for B */
index 2eb0aea678e91dfa2ca7087277cabb24512f257f..320fe3471f44e75a976940da35a122a245af8169 100644 (file)
@@ -368,7 +368,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
     int m, n, bnz, *b_colptr, i;
     int delta, maxint, nofsub, *invp;
     int *b_rowind, *dhead, *qsize, *llist, *marker;
-    double t, SuperLU_timer_();
+    /* double t, SuperLU_timer_(); */
     
     /* make gcc happy */
     b_rowind=NULL;
@@ -377,7 +377,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
     m = A->nrow;
     n = A->ncol;
 
-    t = SuperLU_timer_();
+    /* t = SuperLU_timer_(); */
     switch ( ispec ) {
         case 0: /* Natural ordering */
              for (i = 0; i < n; ++i) perm_c[i] = i;
@@ -391,8 +391,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
 #if ( PRNTlevel>=1 )
              printf("Use minimum degree ordering on A'*A.\n");
 #endif
-             t = SuperLU_timer_() - t;
-             /*printf("Form A'*A time = %8.3f\n", t);*/
+             /*t = SuperLU_timer_() - t;
+             printf("Form A'*A time = %8.3f\n", t);*/
              break;
         case 2: /* Minimum degree ordering on A'+A */
              if ( m != n ) ABORT("Matrix is not square");
@@ -401,8 +401,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
 #if ( PRNTlevel>=1 )
              printf("Use minimum degree ordering on A'+A.\n");
 #endif
-             t = SuperLU_timer_() - t;
-             /*printf("Form A'+A time = %8.3f\n", t);*/
+             /*t = SuperLU_timer_() - t;
+             printf("Form A'+A time = %8.3f\n", t);*/
              break;
         case 3: /* Approximate minimum degree column ordering. */
              get_colamd(m, n, Astore->nnz, Astore->colptr, Astore->rowind,
@@ -417,7 +417,7 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
     }
 
     if ( bnz != 0 ) {
-       t = SuperLU_timer_();
+       /* t = SuperLU_timer_(); */
 
        /* Initialize and allocate storage for GENMMD. */
        delta = 1; /* DELTA is a parameter to allow the choice of nodes
@@ -452,8 +452,8 @@ get_perm_c(int ispec, SuperMatrix *A, int *perm_c)
        SUPERLU_FREE(llist);
        SUPERLU_FREE(marker);
 
-       t = SuperLU_timer_() - t;
-       /*  printf("call GENMMD time = %8.3f\n", t);*/
+       /* t = SuperLU_timer_() - t;
+       printf("call GENMMD time = %8.3f\n", t);*/
 
     } else { /* Empty adjacency structure */
        for (i = 0; i < n; ++i) perm_c[i] = i;
index cb8d83686becbd7eaede3b223eef61b957db7c01..3d4f5968778c905e7af34561c733aac49d47b1e0 100644 (file)
@@ -303,7 +303,6 @@ scolumn_bmod (
           d_fsupc=0 if fsupc >= fpanelc. */
        d_fsupc = fst_col - fsupc;
 
-       lptr = xlsub[fsupc] + d_fsupc;
        luptr = xlusup[fst_col] + d_fsupc;
        nsupr = xlsub[fsupc+1] - xlsub[fsupc];  /* Leading dimension */
        nsupc = jcol - fst_col; /* Excluding jcol */
index a1d66ed734195b1dccc5ca3b4cb083a1d01e213f..da904ba3e9d806306429ff9dfdf75e960b3e4083 100644 (file)
@@ -9,9 +9,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
 {
 
 
-    /* System generated locals */
-    int i__1, i__2;
-
     /* Local variables */
     static int info;
     static float temp;
@@ -213,14 +210,12 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
            }
        } else {
            if (*incx == 1) {
-               i__1 = *n;
                for (j = 1; j <= *n; ++j) {
                    if (X(j) != 0.f) {
                        if (nounit) {
                            X(j) /= A(j,j);
                        }
                        temp = X(j);
-                       i__2 = *n;
                        for (i = j + 1; i <= *n; ++i) {
                            X(i) -= temp * A(i,j);
 /* L50: */
@@ -230,7 +225,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
                }
            } else {
                jx = kx;
-               i__1 = *n;
                for (j = 1; j <= *n; ++j) {
                    if (X(jx) != 0.f) {
                        if (nounit) {
@@ -238,7 +232,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
                        }
                        temp = X(jx);
                        ix = jx;
-                       i__2 = *n;
                        for (i = j + 1; i <= *n; ++i) {
                            ix += *incx;
                            X(ix) -= temp * A(i,j);
@@ -256,10 +249,8 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
 
        if (lsame_(uplo, "U")) {
            if (*incx == 1) {
-               i__1 = *n;
                for (j = 1; j <= *n; ++j) {
                    temp = X(j);
-                   i__2 = j - 1;
                    for (i = 1; i <= j-1; ++i) {
                        temp -= A(i,j) * X(i);
 /* L90: */
@@ -272,11 +263,9 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
                }
            } else {
                jx = kx;
-               i__1 = *n;
                for (j = 1; j <= *n; ++j) {
                    temp = X(jx);
                    ix = kx;
-                   i__2 = j - 1;
                    for (i = 1; i <= j-1; ++i) {
                        temp -= A(i,j) * X(ix);
                        ix += *incx;
@@ -294,7 +283,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
            if (*incx == 1) {
                for (j = *n; j >= 1; --j) {
                    temp = X(j);
-                   i__1 = j + 1;
                    for (i = *n; i >= j+1; --i) {
                        temp -= A(i,j) * X(i);
 /* L130: */
@@ -311,7 +299,6 @@ int strsv_(char *, char *, char *, int *, float *, int *, float *, int *);
                for (j = *n; j >= 1; --j) {
                    temp = X(jx);
                    ix = kx;
-                   i__1 = j + 1;
                    for (i = *n; i >= j+1; --i) {
                        temp -= A(i,j) * X(ix);
                        ix -= *incx;
index 510ade8233cf02db3d12a5a4e31672d7b0815204..a77e87b9c65d5b8205ef72c5e7b92f447472d5dc 100644 (file)
@@ -370,8 +370,6 @@ void
 sFillRHS(trans_t trans, int nrhs, float *x, int ldx,
          SuperMatrix *A, SuperMatrix *B)
 {
-    NCformat *Astore;
-    float   *Aval;
     DNformat *Bstore;
     float   *rhs;
     float one = 1.0;
@@ -379,8 +377,6 @@ sFillRHS(trans_t trans, int nrhs, float *x, int ldx,
     int      ldc;
     char transc[1];
 
-    Astore = A->Store;
-    Aval   = (float *) Astore->nzval;
     Bstore = B->Store;
     rhs    = Bstore->nzval;
     ldc    = Bstore->lda;
index f13108b22563d3e141a7600d3eef16b9c681b927..c4c478cec2bc2e8dea195a026d36a87b8831eba4 100644 (file)
@@ -24,7 +24,8 @@
 #define NUM_TEMPV(m,w,t,b)  ( SUPERLU_MAX(m, (t + b)*w) )
 
 #ifndef USER_ABORT
-#define USER_ABORT(msg) superlu_abort_and_exit(msg)
+#define USER_ABORT(msg) \
+ {  fprintf(stderr, "%s", msg); exit (-1); }
 #endif
 
 #define ABORT(err_msg) \
index 4eaf49dc679acdb7535ff663fcbd496b5924ebbb..e17566b7d551dc9c560e3452393a4ee6d3ec3cf7 100644 (file)
@@ -1704,7 +1704,7 @@ static void scene_sort_groups(Main *bmain, Scene *sce)
 /* sort the base list on dependency order */
 void DAG_scene_sort(Main *bmain, Scene *sce)
 {
-       DagNode *node;
+       DagNode *node, *rootnode;
        DagNodeQueue *nqueue;
        DagAdjList *itA;
        int time;
@@ -1726,11 +1726,10 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
        
        time = 1;
        
-       node = sce->theDag->DagNode.first;
-       
-       node->color = DAG_GRAY;
+       rootnode = sce->theDag->DagNode.first;
+       rootnode->color = DAG_GRAY;
        time++;
-       push_stack(nqueue,node);  
+       push_stack(nqueue,rootnode);  
        
        while(nqueue->count) {
                
@@ -2848,10 +2847,8 @@ void DAG_pose_sort(Object *ob)
        for(node = dag->DagNode.first; node; node= node->next) 
                node->color = DAG_WHITE;
        
-       node = dag->DagNode.first;
-       
-       node->color = DAG_GRAY;
-       push_stack(nqueue, node);  
+       rootnode->color = DAG_GRAY;
+       push_stack(nqueue, rootnode);  
        
        while(nqueue->count) {
                
index b9947c506d10fe98f01862ed4e3cb7c99a809988..318165af80402fc1156da246d7823cac41bb6a9d 100644 (file)
@@ -1414,10 +1414,7 @@ void driver_free_variable (ChannelDriver *driver, DriverVar *dvar)
        DRIVER_TARGETS_LOOPER_END
        
        /* remove the variable from the driver */
-       if (driver)
-               BLI_freelinkN(&driver->variables, dvar);
-       else
-               MEM_freeN(dvar);
+       BLI_freelinkN(&driver->variables, dvar);
 
 #ifdef WITH_PYTHON
        /* since driver variables are cached, the expression needs re-compiling too */
index 736c889f66c7dd84df7b9f6e1d223222727f125a..7b2cfd46d337e0152619aca49b2f7fc050ccb93e 100644 (file)
@@ -988,9 +988,9 @@ void unlink_movieclip(Main *bmain, MovieClip *clip)
        }
 
        for(ob= bmain->object.first; ob; ob= ob->id.next) {
-               bConstraint *con= ob->constraints.first;
+               bConstraint *con;
 
-               for (con= ob->constraints.first; con; con= con->next) {
+               for(con= ob->constraints.first; con; con= con->next) {
                        bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
 
                        if(cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) {
index 374ef3512e81e8253222cb0d44bc1122943cd1fe..e773eb6dd35606fa6e5b16be65059bbd8fd009ba 100644 (file)
@@ -2292,6 +2292,9 @@ static int ccgdm_adjacent_grid(CCGSubSurf *ss, int *gridOffset, CCGFace *f, int
                                break;
                }
        }
+
+       if(numEdges == 0)
+               return -1;
        
        fIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, adjf));
 
index 83adfa1223634500e5a5e71da3fdfb9065b0cf24..04e8c3df0774c111c4c7f10062e9bcd147a73e7c 100644 (file)
@@ -1288,8 +1288,8 @@ int BKE_tracking_next(MovieTrackingContext *context)
                                MEM_freeN(image_new);
                        }
 
-                       coords_correct= !isnan(x2) && !isnan(y2) && finite(x2) && finite(y2);
-                       if(coords_correct && !onbound && (tracked || !context->disable_failed)) {
+                       coords_correct= !onbound && !isnan(x2) && !isnan(y2) && finite(x2) && finite(y2);
+                       if(coords_correct && (tracked || !context->disable_failed)) {
                                if(context->first_time) {
                                        #pragma omp critical
                                        {
index 8c699c840dccfa92c932801755d94ed1b87e4b6d..a21c394a81eb8247c9581f4143b2931e8fb469b2 100644 (file)
@@ -496,7 +496,7 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA
                                break;
                        
                        /* store this level as the 'old' level now */
-                       prevLevel= level; // XXX: prevLevel is unused
+                       // prevLevel= level; // XXX: prevLevel is unused
                }
        }
 }
index fe6aed77462d2d65606749de4b6959651a34f857..45b715c406a96596e92b87400f6e3799ce07a398 100644 (file)
@@ -2205,12 +2205,12 @@ size_t ANIM_animdata_filter (bAnimContext *ac, ListBase *anim_data, int filter_m
        
        /* only filter data if there's somewhere to put it */
        if (data && anim_data) {
-               Object *obact= (ac) ? ac->obact : NULL;
                
                /* firstly filter the data */
                switch (datatype) {
                        case ANIMCONT_ACTION:   /* 'Action Editor' */
                        {
+                               Object *obact= ac->obact;
                                SpaceAction *saction = (SpaceAction *)ac->sl;
                                bDopeSheet *ads = (saction)? &saction->ads : NULL;
                                
index 33796b7c215e10feaa26795a20c57c625f24a625..7182bbc38e205a0de05633c11c76cd29c2c9cab7 100644 (file)
@@ -538,12 +538,8 @@ static void codegen_call_functions(DynStr *ds, ListBase *nodes, GPUOutput *final
                                        BLI_dynstr_appendf(ds, ", gl_TexCoord[%d].st", input->texid);
                        }
                        else if (input->source == GPU_SOURCE_TEX_PIXEL) {
-                               if (input->link && input->link->output)
-                                       codegen_convert_datatype(ds, input->link->output->type, input->type,
-                                               "tmp", input->link->output->id);
-                               else
-                                       codegen_convert_datatype(ds, input->link->output->type, input->type,
-                                               "tex", input->texid);
+                               codegen_convert_datatype(ds, input->link->output->type, input->type,
+                                       "tmp", input->link->output->id);
                        }
                        else if(input->source == GPU_SOURCE_BUILTIN)
                                BLI_dynstr_appendf(ds, "%s", GPU_builtin_name(input->builtin));
index 2dcce99606568c367475a72f791639ac4fac5a06..5d36ba169f346cb8fb5fd3f8da5c4b30268de054 100644 (file)
@@ -1069,7 +1069,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
 
                /* setting do_alpha_after = 1 indicates this object needs to be
                 * drawn in a second alpha pass for improved blending */
-               if(GMS.use_alpha_pass && !GMS.is_alpha_pass)
+               if(do_alpha_after && !GMS.is_alpha_pass)
                        if(ELEM3(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ADD, GPU_BLEND_ALPHA_SORT))
                                *do_alpha_after= 1;
 
index 250ea51f8c8c47fbfe2ba09bc10551cdb46ed8a6..fb1d10b549118824f85e2437ee768be1f0e9ec83 100644 (file)
@@ -972,7 +972,6 @@ static void do_material_tex(GPUShadeInput *shi)
                                GPU_link(mat, "mtex_mapping_ofs", texco, GPU_uniform(ofs), &texco);
 
                        talpha = 0;
-                       rgbnor = 0;
 
                        if(tex && tex->type == TEX_IMAGE && tex->ima) {
                                GPU_link(mat, "mtex_image", texco, GPU_image(tex->ima, &tex->iuser), &tin, &trgb);
index 20202319d4438645e9aec2affc9cddc414789ea7..14b4a7bcf9f788d88e9e55c0956e8d60e6e72b5f 100644 (file)
@@ -978,7 +978,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is)
                }
                
                xo=ocx1; yo=ocy1; zo=ocz1;
-               labdao= ddalabda= MIN3(labdax,labday,labdaz);
+               ddalabda= MIN3(labdax,labday,labdaz);
                
                vec2[0]= ox1;
                vec2[1]= oy1;
index 78f2fe6171b7052dcf602e2c82d0d1a00a645e91..122b47016eb23a8aa1e60eb9aeb10b9f497e958e 100644 (file)
@@ -592,7 +592,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
 {
        MemArena *arena= NULL;
        VertexTangent **vtangents= NULL;
-       int a, iCalcNewMethod;
+       int a;
 
        if(do_nmap_tangent) {
                arena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "nmap tangent arena");
@@ -680,8 +680,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
                }
        }
 
-       iCalcNewMethod = 1;
-       if(iCalcNewMethod!=0 && do_nmap_tangent!=0)
+       if(do_nmap_tangent!=0)
        {
                SRenderMeshToTangent mesh2tangent;
                SMikkTSpaceContext sContext;
@@ -701,11 +700,9 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
                sInterface.m_getNormal = GetNormal;
                sInterface.m_setTSpaceBasic = SetTSpace;
 
-               // 0 if failed
-               iCalcNewMethod = genTangSpaceDefault(&sContext);
+               genTangSpaceDefault(&sContext);
        }
 
-
        if(arena)
                BLI_memarena_free(arena);
        if(vtangents)
@@ -1068,7 +1065,6 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
 
                mul_v3_fl(cross, width);
        }
-       else width= 1.0f;
        
        if(ma->mode & MA_TANGENT_STR)
                flag= R_SMOOTH|R_TANGENT;
index b62484a6995697808c580a357031469e6b80ed03..f261ec4174697c5b02b20b20a5269188c1134979 100644 (file)
@@ -176,7 +176,6 @@ static void render_lighting_halo(HaloRen *har, float col_r[3])
                        if(inpr<t) continue;
                        else {
                                t= inpr-t;
-                               i= 1.0;
                                soft= 1.0;
                                if(t<lar->spotbl && lar->spotbl!=0.0f) {
                                        /* soft area */
index b8c4b05de50ee4f709c9164fbf46fd13be320c0d..41bfcb550681e5032a5735d4fa45cb8d72c8defb 100644 (file)
@@ -2010,7 +2010,7 @@ static void ray_ao_qmc(ShadeInput *shi, float ao[3], float env[3])
                
                samples++;
                
-               if (qsa->type == SAMP_TYPE_HALTON) {
+               if (qsa && qsa->type == SAMP_TYPE_HALTON) {
                        /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */          
                        if (adapt_thresh > 0.0f && (samples > max_samples/2) ) {
                                
index 25575fa965fa15ed82ffabfade668dd0b17635bb..43761be9d713b37aa237b35526522eab9d3f41f7 100644 (file)
@@ -1026,7 +1026,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma,   float *vec,   f
                        externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0);
 
                        yn= tin*mtex->colfac;
-                       zn= tin*mtex->alphafac;
+                       //zn= tin*mtex->alphafac;
 
                        if(mtex->mapto & MAP_COL) {
                                zn= 1.0f-yn;
@@ -1112,10 +1112,8 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
        if(ma->mode & MA_HALO_RINGS) har->ringc= ma->ringc;
        if(ma->mode & MA_HALO_FLARE) har->flarec= ma->flarec;
 
-       if((ma->mode & MA_HALOTEX) && ma->mtex[0]){
+       if((ma->mode & MA_HALOTEX) && ma->mtex[0])
                har->tex= 1;
-               i=1;
-       }
        
        for(i=0; i<MAX_MTEX; i++)
                if(ma->mtex[i] && (ma->septex & (1<<i))==0) {
index 4d654beb287b4dc92e95582477da6558de2172cf..b99bab04b10d71151d92406f3c5b2acd155c1112 100644 (file)
@@ -269,14 +269,12 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
                                if(p1[2]<-ladist) t1= t3;
                        }
                        else {
-                               ok1= 1;
                                t1= t3;
                        }
                        if(ok2) {
                                if(p2[2]<-ladist) t2= t3;
                        }
                        else {
-                               ok2= 1;
                                t2= t3;
                        }
                }
index 4fc3bb7c5da8862da949ae4385dbefb183e3dda6..89f74418563f637a359f6e0cfb8f1e377362f6ea 100644 (file)
@@ -833,7 +833,6 @@ int zbuffer_strands_abuf(Render *re, RenderPart *pa, APixstrand *apixbuf, ListBa
 
        memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "strand sort arena");
        firstseg= NULL;
-       sortseg= sortsegments;
        totsegment= 0;
 
        /* for all object instances */
index a46ef3888d83e33ad9d842bfb8fabec226ab3af9..3637c2de1fbb2717436324da1c5ecfd11f2d66a1 100644 (file)
@@ -746,7 +746,6 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
        float tr[3] = {1.0,1.0,1.0};
        Isect is= {{0}};
        float *startco, *endco;
-       int intersect_type = VOL_BOUNDS_DEPTH;
 
        memset(shr, 0, sizeof(ShadeResult));
        
@@ -755,12 +754,11 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
        if (shi->flippednor) {
                startco = last_is->start;
                endco = shi->co;
-               intersect_type = VOL_BOUNDS_SS;
        }
        
        /* trace to find a backface, the other side bounds of the volume */
        /* (ray intersect ignores front faces here) */
-       else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, intersect_type)) {
+       else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH)) {
                startco = shi->co;
                endco = hitco;
        }