From fa2ba5fbf5848e4d61b697c624af9b9e9456eb20 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Aug 2011 05:06:30 +0000 Subject: - use static vars and functions where possible. - use NULL rather than 0 when used as pointers. --- source/blender/blenkernel/intern/material.c | 4 +-- source/blender/blenkernel/intern/seqeffects.c | 4 +-- source/blender/blenlib/intern/BLI_ghash.c | 2 +- source/blender/blenlib/intern/callbacks.c | 2 +- .../blender/editors/interface/interface_layout.c | 2 +- source/blender/editors/physics/particle_edit.c | 2 +- source/blender/editors/render/render_preview.c | 1 + source/blender/editors/screen/screen_ops.c | 2 +- .../blender/editors/space_outliner/outliner_tree.c | 2 +- .../editors/space_sequencer/sequencer_draw.c | 8 +++--- .../editors/space_sequencer/sequencer_select.c | 2 +- source/blender/gpu/intern/gpu_codegen.c | 6 ++--- source/blender/gpu/intern/gpu_draw.c | 2 +- source/blender/gpu/intern/gpu_extensions.c | 2 +- source/blender/makesdna/intern/makesdna.c | 30 +++++++++++----------- source/blender/makesrna/intern/makesrna.c | 2 +- source/blender/makesrna/intern/rna_main_api.c | 1 + source/blender/makesrna/intern/rna_modifier.c | 1 + source/blender/makesrna/intern/rna_nodetree.c | 2 +- source/blender/makesrna/intern/rna_object_force.c | 17 ++++++------ source/blender/makesrna/intern/rna_particle.c | 17 ++++++------ source/blender/makesrna/intern/rna_texture.c | 3 ++- source/blender/python/intern/bpy_intern_string.c | 3 ++- source/blender/python/intern/bpy_props.c | 4 +-- source/blender/render/intern/source/pointdensity.c | 2 +- source/blender/windowmanager/intern/wm_init_exit.c | 2 +- source/blender/windowmanager/intern/wm_keymap.c | 2 +- 27 files changed, 67 insertions(+), 60 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 9c455e84109..29615986191 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -515,7 +515,7 @@ short *give_totcolp_id(ID *id) return NULL; } -void data_delete_material_index_id(ID *id, int index) +static void data_delete_material_index_id(ID *id, int index) { switch(GS(id->name)) { case ID_ME: @@ -1365,7 +1365,7 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col) } /* copy/paste buffer, if we had a propper py api that would be better */ -Material matcopybuf; +static Material matcopybuf; static short matcopied= 0; void clear_matcopybuf(void) diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index cf95692c8b4..8b50ad2b042 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -2873,7 +2873,7 @@ static struct ImBuf * do_adjustment_impl(SeqRenderData context, Sequence * seq, { Editing * ed; ListBase * seqbasep; - struct ImBuf * i = 0; + struct ImBuf * i= NULL; ed = context.scene->ed; @@ -2908,7 +2908,7 @@ static struct ImBuf * do_adjustment( struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2), struct ImBuf *UNUSED(ibuf3)) { - struct ImBuf * i = 0; + struct ImBuf * i = NULL; struct ImBuf * out; Editing * ed; diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index bfee350037a..03e3b7ab560 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -40,7 +40,7 @@ #include "BLO_sys_types.h" // for intptr_t support /***/ -unsigned int hashsizes[]= { +static unsigned int hashsizes[]= { 5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209, 16411, 32771, 65537, 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, 67108879, 134217757, diff --git a/source/blender/blenlib/intern/callbacks.c b/source/blender/blenlib/intern/callbacks.c index a033e01696d..d28f794440f 100644 --- a/source/blender/blenlib/intern/callbacks.c +++ b/source/blender/blenlib/intern/callbacks.c @@ -28,7 +28,7 @@ #include "MEM_guardedalloc.h" -static ListBase callback_slots[BLI_CB_EVT_TOT]= {{0}}; +static ListBase callback_slots[BLI_CB_EVT_TOT]= {{NULL}}; void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt) { diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3575a8527fc..ef88bb0bbb6 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1361,7 +1361,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) { MenuType *mt= (MenuType*)arg_mt; - Menu menu = {0}; + Menu menu = {NULL}; menu.type= mt; menu.layout= layout; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index b8cdc18e739..4b0c1cb1222 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3988,7 +3988,7 @@ static void PTCacheUndo_clear(PTCacheEdit *edit) { PTCacheUndo *undo; - if(edit==0) return; + if(edit==NULL) return; undo= edit->undo.first; while(undo) { diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 007ae96ae59..b937f9a4104 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -64,6 +64,7 @@ #include "DNA_brush_types.h" #include "DNA_screen_types.h" +#include "BKE_brush.h" #include "BKE_context.h" #include "BKE_depsgraph.h" #include "BKE_global.h" diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 0ac30853eae..ede17790318 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1702,7 +1702,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int region_scale_cancel(bContext *UNUSED(C), wmOperator *op) +static int region_scale_cancel(bContext *UNUSED(C), wmOperator *op) { MEM_freeN(op->customdata); op->customdata = NULL; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 3560bfb9896..74e9e775087 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -231,7 +231,7 @@ void outliner_free_tree(ListBase *lb) } /* Find ith item from the treestore */ -TreeElement *outliner_find_tree_element(ListBase *lb, int store_index) +static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index) { TreeElement *te= lb->first, *tes; while(te) { diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index dc84289a8de..9a904b1a970 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -700,7 +700,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline } } -static Sequence *special_seq_update= 0; +static Sequence *special_seq_update= NULL; static void UNUSED_FUNCTION(set_special_seq_update)(int val) { @@ -710,14 +710,14 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val) if(val) { // XXX special_seq_update= find_nearest_seq(&x); } - else special_seq_update= 0; + else special_seq_update= NULL; } void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs) { struct Main *bmain= CTX_data_main(C); - struct ImBuf *ibuf = 0; - struct ImBuf *scope = 0; + struct ImBuf *ibuf= NULL; + struct ImBuf *scope= NULL; struct View2D *v2d = &ar->v2d; int rectx, recty; float viewrectx, viewrecty; diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 0ac23765167..86b28f5e89e 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -846,7 +846,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) for(seq= ed->seqbasep->first; seq; seq= seq->next) { seq_rectf(seq, &rq); - if(BLI_isect_rctf(&rq, &rectf, 0)) { + if(BLI_isect_rctf(&rq, &rectf, NULL)) { if(selecting) seq->flag |= SELECT; else seq->flag &= ~SEQ_ALLSEL; recurs_sel_seq(seq); diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 910576fa34e..77498835d57 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -82,7 +82,7 @@ typedef enum GPUDataSource { } GPUDataSource; static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4", - 0, 0, 0, 0, "mat3", 0, 0, 0, 0, 0, 0, "mat4"}; + NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"}; struct GPUNode { struct GPUNode *next, *prev; @@ -451,7 +451,7 @@ static int codegen_input_has_texture(GPUInput *input) else if(input->ima) return 1; else - return input->tex != 0; + return input->tex != NULL; } const char *GPU_builtin_name(GPUBuiltin builtin) @@ -880,7 +880,7 @@ void GPU_pass_unbind(GPUPass *pass) GPU_texture_unbind(input->tex); if (input->ima) - input->tex = 0; + input->tex = NULL; } GPU_shader_unbind(shader); diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 9878d83ff5a..7af5ef6ea14 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -308,7 +308,7 @@ void GPU_set_anisotropic(float value) } } -float GPU_get_anisotropic() +float GPU_get_anisotropic(void) { return GTS.anisotropic; } diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index f6352a96878..c9f1b093b7a 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -484,7 +484,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels) //if (fpixels) // pixels = GPU_texture_convert_pixels(w*h*depth, fpixels); - glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0); + glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, NULL); GPU_print_error("3D glTexImage3D"); diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 80299d44a78..3e5e7bbdc0e 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -137,18 +137,18 @@ const char *includefiles[] = { "" }; -int maxdata= 500000, maxnr= 50000; -int nr_names=0; -int nr_types=0; -int nr_structs=0; -char **names, *namedata; /* at address names[a] is string a */ -char **types, *typedata; /* at address types[a] is string a */ -short *typelens; /* at typelens[a] is de length of type a */ -short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */ -short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition - sp[0] is type number - sp[1] is amount of elements - sp[2] sp[3] is typenr, namenr (etc) */ +static int maxdata= 500000, maxnr= 50000; +static int nr_names=0; +static int nr_types=0; +static int nr_structs=0; +static char **names, *namedata; /* at address names[a] is string a */ +static char **types, *typedata; /* at address types[a] is string a */ +static short *typelens; /* at typelens[a] is de length of type a */ +static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */ +static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition + sp[0] is type number + sp[1] is amount of elements + sp[2] sp[3] is typenr, namenr (etc) */ /** * Variable to control debug output of makesdna. * debugSDNA: @@ -157,8 +157,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str * - 2 = full trace, tell which names and types were found * - 4 = full trace, plus all gritty details */ -int debugSDNA = 0; -int additional_slen_offset; +static int debugSDNA = 0; +static int additional_slen_offset; /* ************************************************************************** */ /* Functions */ @@ -889,7 +889,7 @@ void printStructLenghts(void) } -int make_structDNA(char *baseDirectory, FILE *file) +static int make_structDNA(char *baseDirectory, FILE *file) { int len, i; short *sp; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index d47abced85e..b95bd2b2087 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -66,7 +66,7 @@ static int file_older(const char *file1, const char *file2) return (st1.st_mtime < st2.st_mtime); } -const char *makesrna_path= NULL; +static const char *makesrna_path= NULL; static int replace_if_different(char *tmpfile, const char *dep_files[]) { diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 8ac620c2fcf..ea0364084f9 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -38,6 +38,7 @@ #include "RNA_define.h" #include "RNA_access.h" #include "RNA_enum_types.h" +#include "rna_internal.h" #include "BKE_utildefines.h" diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 5c5391b0bba..37a629f46d0 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -32,6 +32,7 @@ #include #include "RNA_define.h" +#include "RNA_enum_types.h" #include "rna_internal.h" diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 7fd6a9dacfe..56492a52da9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -732,7 +732,7 @@ static StructRNA* def_node(BlenderRNA *brna, int node_id) return srna; } -void alloc_node_type_items(EnumPropertyItem *items, int category) +static void alloc_node_type_items(EnumPropertyItem *items, int category) { int i; int count = 3; diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 463f65fd3d5..490d9c38840 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -43,7 +43,7 @@ #include "WM_api.h" #include "WM_types.h" -EnumPropertyItem effector_shape_items[] = { +static EnumPropertyItem effector_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""}, @@ -51,20 +51,23 @@ EnumPropertyItem effector_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem curve_shape_items[] = { +#ifdef RNA_RUNTIME + +/* type spesific return values only used from functions */ +static EnumPropertyItem curve_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem empty_shape_items[] = { +static EnumPropertyItem empty_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem vortex_shape_items[] = { +static EnumPropertyItem vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""}, @@ -72,21 +75,19 @@ EnumPropertyItem vortex_shape_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem curve_vortex_shape_items[] = { +static EnumPropertyItem curve_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem empty_vortex_shape_items[] = { +static EnumPropertyItem empty_vortex_shape_items[] = { {PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""}, {PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""}, {0, NULL, 0, NULL, NULL} }; -#ifdef RNA_RUNTIME - #include "MEM_guardedalloc.h" #include "DNA_modifier_types.h" diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 30fce5716a9..ba91fc3536b 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -33,6 +33,7 @@ #include "limits.h" #include "RNA_define.h" +#include "RNA_enum_types.h" #include "rna_internal.h" @@ -50,34 +51,34 @@ #include "WM_types.h" #include "WM_api.h" -EnumPropertyItem part_from_items[] = { +static EnumPropertyItem part_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_reactor_from_items[] = { +static EnumPropertyItem part_reactor_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_dist_items[] = { +static EnumPropertyItem part_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {PART_DISTR_GRID, "GRID", 0, "Grid", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_hair_dist_items[] = { +static EnumPropertyItem part_hair_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_draw_as_items[] = { +static EnumPropertyItem part_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_DOT, "DOT", 0, "Point", ""}, @@ -87,14 +88,14 @@ EnumPropertyItem part_draw_as_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_hair_draw_as_items[] = { +static EnumPropertyItem part_hair_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_ren_as_items[] = { +static EnumPropertyItem part_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_HALO, "HALO", 0, "Halo", ""}, {PART_DRAW_LINE, "LINE", 0, "Line", ""}, @@ -105,7 +106,7 @@ EnumPropertyItem part_ren_as_items[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem part_hair_ren_as_items[] = { +static EnumPropertyItem part_hair_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index f459563f49e..0ecc41d80d8 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -32,6 +32,7 @@ #include #include "RNA_define.h" +#include "RNA_enum_types.h" #include "rna_internal.h" @@ -47,7 +48,7 @@ #include "BKE_node.h" -EnumPropertyItem texture_filter_items[] = { +static EnumPropertyItem texture_filter_items[] = { {TXF_BOX, "BOX", 0, "Box", ""}, {TXF_EWA, "EWA", 0, "EWA", ""}, {TXF_FELINE, "FELINE", 0, "FELINE", ""}, diff --git a/source/blender/python/intern/bpy_intern_string.c b/source/blender/python/intern/bpy_intern_string.c index c6629007532..6fc861b2a0d 100644 --- a/source/blender/python/intern/bpy_intern_string.c +++ b/source/blender/python/intern/bpy_intern_string.c @@ -28,13 +28,14 @@ #include +#include "bpy_intern_string.h" + PyObject *bpy_intern_str_register; PyObject *bpy_intern_str_unregister; PyObject *bpy_intern_str_bl_rna; PyObject *bpy_intern_str_order; PyObject *bpy_intern_str_attr; PyObject *bpy_intern_str___slots__; -PyObject *bpy_intern_str___bases__; void bpy_intern_string_init(void) { diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index a0ad1ff7850..5da142aeea7 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -117,7 +117,7 @@ static PyObject *pymeth_PointerProperty= NULL; static PyObject *pymeth_CollectionProperty= NULL; static PyObject *pymeth_RemoveProperty= NULL; -PyObject *pyrna_struct_as_instance(PointerRNA *ptr) +static PyObject *pyrna_struct_as_instance(PointerRNA *ptr) { PyObject *self= NULL; /* first get self */ @@ -177,7 +177,7 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw) } /* callbacks */ -void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop) +static void bpy_prop_update_cb(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop) { PyGILState_STATE gilstate; PyObject **py_data= (PyObject **)RNA_property_py_data_get(prop); diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index b45528b96d9..980f6b6af1e 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -104,7 +104,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa { DerivedMesh* dm; ParticleKey state; - ParticleSimulationData sim= {0}; + ParticleSimulationData sim= {NULL}; ParticleData *pa=NULL; float cfra = BKE_curframe(re->scene); int i, childexists; diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index cf91e219593..850de9029c9 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -116,7 +116,7 @@ static void wm_free_reports(bContext *C) BKE_reports_clear(CTX_wm_reports(C)); } -int wm_start_with_console = 0; +int wm_start_with_console = 0; /* used in creator.c */ /* only called once, for startup */ void WM_init(bContext *C, int argc, const char **argv) diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 6887aa4c717..0e94ad72d35 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -225,7 +225,7 @@ static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname) return NULL; } -wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) +static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) { wmKeyConfig *keyconf; -- cgit v1.2.3