Cleanup: warnings, style
authorCampbell Barton <ideasman42@gmail.com>
Mon, 15 May 2017 04:58:55 +0000 (14:58 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 15 May 2017 04:58:55 +0000 (14:58 +1000)
source/blender/blenkernel/intern/armature.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/space_node/node_edit.c
source/blender/makesrna/intern/rna_scene.c
source/blender/nodes/composite/nodes/node_composite_image.c

index 1ee71c8448cadc9817963c13798d5743573ab730..d7ea534068de92103cbd7b4ce3213f8480f2546b 100644 (file)
@@ -1985,6 +1985,8 @@ void BKE_pose_rebuild_ex(Object *ob, bArmature *arm, const bool sort_bones)
        if (counter > 1 && sort_bones) {
                DAG_pose_sort(ob);
        }
+#else
+       UNUSED_VARS(sort_bones);
 #endif
 
        ob->pose->flag &= ~POSE_RECALC;
index ef9062298a0cfaccedaf588945047d50c7358a7a..ee9665dc834e3de8ac2fd645aa88fb417e52fe2d 100644 (file)
@@ -2244,8 +2244,9 @@ static void write_mesh(WriteData *wd, Mesh *mesh)
                         *     outside of save process itself.
                         *     Maybe we can live with this, though?
                         */
-                       mesh->totface = BKE_mesh_mpoly_to_mface(&mesh->fdata, &old_mesh->ldata, &old_mesh->pdata,
-                                                                                                       mesh->totface, old_mesh->totloop, old_mesh->totpoly);
+                       mesh->totface = BKE_mesh_mpoly_to_mface(
+                               &mesh->fdata, &old_mesh->ldata, &old_mesh->pdata,
+                               mesh->totface, old_mesh->totloop, old_mesh->totpoly);
 
                        BKE_mesh_update_customdata_pointers(mesh, false);
 
index d767ce03dafc45ea1f45a6de757f3b2739db5978..d5d9e4abe2c7b33d0708eaa1c581f6d7d2f82e0d 100644 (file)
@@ -635,7 +635,7 @@ static void bm_mesh_loops_calc_normals(
                        BM_elem_flag_disable(l_curr, BM_ELEM_TAG);
                } while ((l_curr = l_curr->next) != l_first);
        }
-       bm->elem_index_dirty &= ~(BM_FACE|BM_LOOP);
+       bm->elem_index_dirty &= ~(BM_FACE | BM_LOOP);
 
        /* We now know edges that can be smoothed (they are tagged), and edges that will be hard (they aren't).
         * Now, time to generate the normals.
index 162b94662250d09553c2d111164ed214a0e442a7..5eacbf6f80758d1d38017e1ead721add9ac10d9c 100644 (file)
@@ -894,7 +894,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
                                copy_v2_v2_int(mval, &ptc->x);
 
                                if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) &&
-                                       (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
+                                   (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
                                {
                                        interp_depth = true;
                                }
index 6fab8bf74bcc05939ee5f6f8082ff1d191fa3a79..9dc39b1839bfe3f9db5e7b563a56740b3f28257f 100644 (file)
@@ -581,7 +581,8 @@ void snode_set_context(const bContext *C)
        }
        
        if (snode->nodetree != ntree || snode->id != id || snode->from != from ||
-           (snode->treepath.last == NULL && ntree)) {
+           (snode->treepath.last == NULL && ntree))
+       {
                ED_node_tree_start(snode, ntree, id, from);
        }
 }
index dd30cb0d03f3a9fe55bab77da16ef25ee3121f38..9130bdc6f7be6f1d7e604f3afee6f1b3893eb411 100644 (file)
@@ -1732,7 +1732,7 @@ static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, Po
 
 static void rna_SceneRenderLayer_update_render_passes(ID *id)
 {
-       Scene *scene = (Scene*) id;
+       Scene *scene = (Scene *)id;
        if (scene->nodetree)
                ntreeCompositUpdateRLayers(scene->nodetree);
 }
index f1fdaa32ce4f7f9b71d774460a4416fc1e7d86ed..e958ab9a3dcb3c05c763ddaf33c8471043b13a7b 100644 (file)
@@ -107,8 +107,8 @@ static void cmp_node_image_add_pass_output(bNodeTree *ntree, bNode *node,
 
                BLI_strncpy(sockdata->pass_name, passname, sizeof(sockdata->pass_name));
 
-               sock_index = BLI_listbase_count(&node->outputs)-1;
-               if (sock_index != after_index+1) {
+               sock_index = BLI_listbase_count(&node->outputs) - 1;
+               if (sock_index != after_index + 1) {
                        bNodeSocket *after_sock = BLI_findlink(&node->outputs, after_index);
                        BLI_remlink(&node->outputs, sock);
                        BLI_insertlinkafter(&node->outputs, after_sock, sock);
@@ -218,9 +218,9 @@ static void cmp_node_rlayer_create_outputs(bNodeTree *ntree, bNode *node, LinkNo
 
        if (scene) {
                RenderEngineType *engine_type = RE_engines_find(scene->r.engine);
-               if(engine_type && engine_type->update_render_passes) {
+               if (engine_type && engine_type->update_render_passes) {
                        SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, node->custom1);
-                       if(srl) {
+                       if (srl) {
                                RLayerUpdateData *data = MEM_mallocN(sizeof(RLayerUpdateData), "render layer update data");
                                data->available_sockets = available_sockets;
                                data->prev_index = -1;
@@ -351,9 +351,9 @@ void node_cmp_rlayers_outputs(bNodeTree *ntree, bNode *node)
        cmp_node_image_verify_outputs(ntree, node, true);
 }
 
-const charnode_cmp_rlayers_sock_to_pass(int sock_index)
+const char *node_cmp_rlayers_sock_to_pass(int sock_index)
 {
-       const charsock_to_passname[] = {
+       const char *sock_to_passname[] = {
                RE_PASSNAME_COMBINED, RE_PASSNAME_COMBINED,
                RE_PASSNAME_Z, RE_PASSNAME_NORMAL, RE_PASSNAME_UV, RE_PASSNAME_VECTOR, RE_PASSNAME_RGBA,
                RE_PASSNAME_DIFFUSE, RE_PASSNAME_SPEC, RE_PASSNAME_SHADOW, RE_PASSNAME_AO,
@@ -378,8 +378,7 @@ static void node_composit_init_rlayers(const bContext *C, PointerRNA *ptr)
 
        node->id = &scene->id;
 
-       for (bNodeSocket *sock = node->outputs.first; sock; sock = sock->next, sock_index++)
-       {
+       for (bNodeSocket *sock = node->outputs.first; sock; sock = sock->next, sock_index++) {
                NodeImageLayer *sockdata = MEM_callocN(sizeof(NodeImageLayer), "node image layer");
                sock->storage = sockdata;