- added GCC warning -Wstrict-prototypes
authorCampbell Barton <ideasman42@gmail.com>
Fri, 3 Dec 2010 12:30:59 +0000 (12:30 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 3 Dec 2010 12:30:59 +0000 (12:30 +0000)
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.

137 files changed:
CMakeLists.txt
build_files/cmake/macros.cmake
build_files/scons/config/darwin-config.py
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/linux2-config.py
build_files/scons/config/linuxcross-config.py
build_files/scons/config/openbsd3-config.py
build_files/scons/config/win32-mingw-config.py
extern/glew/include/GL/glew.h
intern/audaspace/intern/AUD_C-API.h
intern/audaspace/intern/AUD_PyInit.h
intern/ghost/GHOST_Path-api.h
intern/ghost/GHOST_Types.h
intern/guardedalloc/intern/mallocn.c
intern/memutil/MEM_CacheLimiterC-Api.h
intern/opennl/CMakeLists.txt
intern/opennl/extern/ONL_opennl.h
intern/opennl/superlu/util.h
source/blender/blenkernel/BKE_icons.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_sketch.h
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/BKE_suggestions.h
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/suggestions.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/writeframeserver.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/storage.c
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.h
source/blender/editors/curve/editcurve.c
source/blender/editors/include/BIF_glutil.h
source/blender/editors/include/UI_interface_icons.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_lattice.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/glutil.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/file_intern.h
source/blender/editors/space_file/filelist.h
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_intern.h
source/blender/editors/space_text/text_python.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_parametrizer.h
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/GPU_buffers.h
source/blender/gpu/GPU_extensions.h
source/blender/gpu/GPU_material.h
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_material.c
source/blender/imbuf/IMB_thumbs.h
source/blender/imbuf/intern/allocimbuf.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_scene.c
source/blender/nodes/intern/TEX_util.c
source/blender/python/generic/noise.c
source/blender/python/intern/stubs.c
source/blender/render/extern/include/RE_raytrace.h
source/blender/render/intern/source/volumetric.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/VideoTexture/FilterBlueScreen.h
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageRender.h

index 4f25199..d555eb6 100644 (file)
@@ -979,7 +979,7 @@ IF((NOT WIN32) AND (NOT MSVC))
 ENDIF((NOT WIN32) AND (NOT MSVC))
 
 IF(CMAKE_COMPILER_IS_GNUCC)
-       SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
+       SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
index 8fbef8a..e421b96 100644 (file)
@@ -261,7 +261,9 @@ ENDMACRO(_REMOVE_STRICT_FLAGS)
 MACRO(REMOVE_STRICT_FLAGS)
 
        IF(CMAKE_COMPILER_IS_GNUCC)
+               _REMOVE_STRICT_FLAGS("-Wstrict-prototypes")
                _REMOVE_STRICT_FLAGS("-Wunused-parameter")
+               _REMOVE_STRICT_FLAGS("-Wshadow")
                _REMOVE_STRICT_FLAGS("-Werror=[^ ]+")
                _REMOVE_STRICT_FLAGS("-Werror")
        ENDIF(CMAKE_COMPILER_IS_GNUCC)
index f23d4a6..57bf6ab 100644 (file)
@@ -327,7 +327,7 @@ if MACOSX_ARCHITECTURE == 'x86_64':
        REL_CCFLAGS = REL_CCFLAGS+['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
 
 CC_WARN = ['-Wall']
-C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas']
+C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
 
 ##FIX_STUBS_WARNINGS = -Wno-unused
index a24537f..fab249c 100644 (file)
@@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
 ##ARFLAGS = ruv
 ##ARFLAGSQUIET = ru
 ##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
 CC_WARN = ['-Wall']
 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
 
index 505deaf..6a4a6ac 100644 (file)
@@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
 ##ARFLAGS = ruv
 ##ARFLAGSQUIET = ru
 ##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
 CC_WARN = ['-Wall']
 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
 
index a857f29..d2f5423 100644 (file)
@@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
 ##ARFLAGS = ruv
 ##ARFLAGSQUIET = ru
 ##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
 CC_WARN = ['-Wall']
 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
 
index 268cb36..07ff307 100644 (file)
@@ -204,7 +204,7 @@ REL_CCFLAGS = ['-O2']
 ##ARFLAGS = ruv
 ##ARFLAGSQUIET = ru
 ##
-C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
 CC_WARN = ['-Wall']
 CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
 
index 9ea5db2..5875538 100644 (file)
@@ -178,7 +178,7 @@ CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_
 CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
 REL_CFLAGS = [ '-O2' ]
 REL_CCFLAGS = [ '-O2' ]
-C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
+C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
 
 CC_WARN = [ '-Wall' ]
 
index 65c2a1a..080e8f0 100644 (file)
@@ -132,7 +132,7 @@ REL_CCFLAGS = ['-O2']
 ##
 CC = 'gcc'
 CXX = 'g++'
-C_WARN = ['-Wdeclaration-after-statement']
+C_WARN = ['-Wdeclaration-after-statement', '-Wstrict-prototypes']
 
 CC_WARN = ['-Wall']
 
index 2913d88..76a0609 100644 (file)
@@ -169,7 +169,7 @@ CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
 REL_CFLAGS = [ '-O2' ]
 REL_CCFLAGS = [ '-O2' ]
 
-C_WARN = [ '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
 
 CC_WARN = [ '-Wall' ]
 
index 3cb7bed..bee6a07 100644 (file)
@@ -12220,7 +12220,7 @@ GLEWAPI GLboolean glewContextIsSupported (GLEWContext* ctx, const char* name);
 
 #else /* GLEW_MX */
 
-GLEWAPI GLenum glewInit ();
+GLEWAPI GLenum glewInit (void);
 GLEWAPI GLboolean glewIsSupported (const char* name);
 #define glewIsExtensionSupported(x) glewIsSupported(x)
 
index 08f2845..71b5ca8 100644 (file)
@@ -58,7 +58,7 @@ typedef struct
 /**
  * Initializes FFMPEG if it is enabled.
  */
-extern void AUD_initOnce();
+extern void AUD_initOnce(void);
 
 /**
  * Initializes an audio device.
@@ -72,17 +72,17 @@ extern int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize
 /**
  * Unitinitializes an audio device.
  */
-extern void AUD_exit();
+extern void AUD_exit(void);
 
 /**
  * Locks the playback device.
  */
-extern void AUD_lock();
+extern void AUD_lock(void);
 
 /**
  * Unlocks the device.
  */
-extern void AUD_unlock();
+extern void AUD_unlock(void);
 
 /**
  * Returns information about a sound.
@@ -471,9 +471,9 @@ extern void AUD_muteSequencer(AUD_Sound* sequencer, AUD_SequencerEntry* entry,
 
 extern int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length);
 
-extern void AUD_startPlayback();
+extern void AUD_startPlayback(void);
 
-extern void AUD_stopPlayback();
+extern void AUD_stopPlayback(void);
 
 extern void AUD_seekSequencer(AUD_Channel* handle, float time);
 
@@ -483,7 +483,7 @@ extern float AUD_getSequencerPosition(AUD_Channel* handle);
 extern void AUD_setSyncCallback(AUD_syncFunction function, void* data);
 #endif
 
-extern int AUD_doesPlayback();
+extern int AUD_doesPlayback(void);
 
 #ifdef __cplusplus
 }
index 0b80b3a..6f18bdb 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 /**
  * Initalizes the Python module.
  */
-extern PyObject* AUD_initPython();
+extern PyObject* AUD_initPython(void);
 
 #ifdef __cplusplus
 }
index c38a4e2..60b05f5 100644 (file)
@@ -41,20 +41,20 @@ extern "C" {
  * "unpack and run" path, then look for properly installed path, not including versioning.
  * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
  */
-extern const GHOST_TUns8* GHOST_getSystemDir();
+extern const GHOST_TUns8* GHOST_getSystemDir(void);
 
 /**
  * Determine the base dir in which user configuration is stored, not including versioning.
  * @return Unsigned char string pointing to user dir (eg ~).
  */
-extern const GHOST_TUns8* GHOST_getUserDir();
+extern const GHOST_TUns8* GHOST_getUserDir(void);
 
 
 /**
  * Determine the dir in which the binary file is found.
  * @return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
  */
-extern const GHOST_TUns8* GHOST_getBinaryDir();
+extern const GHOST_TUns8* GHOST_getBinaryDir(void);
 
 #ifdef __cplusplus
 } 
index 20b6961..3770bbd 100644 (file)
@@ -444,7 +444,7 @@ typedef struct {
    GHOST_TUns64 delta;
 } GHOST_TEventNDOFData;
 
-typedef int     (*GHOST_NDOFLibraryInit_fp)();
+typedef int     (*GHOST_NDOFLibraryInit_fp)(void);
 typedef void    (*GHOST_NDOFLibraryShutdown_fp)(void* deviceHandle);
 typedef void*   (*GHOST_NDOFDeviceOpen_fp)(void* platformData);
 
index 2091238..d1e8874 100644 (file)
@@ -177,13 +177,13 @@ static void print_error(const char *str, ...)
        if (error_callback) error_callback(buf);
 }
 
-static void mem_lock_thread()
+static void mem_lock_thread(void)
 {
        if (thread_lock_callback)
                thread_lock_callback();
 }
 
-static void mem_unlock_thread()
+static void mem_unlock_thread(void)
 {
        if (thread_unlock_callback)
                thread_unlock_callback();
index 898625a..0e53a0b 100644 (file)
@@ -39,7 +39,7 @@ typedef void(*MEM_CacheLimiter_Destruct_Func)(void*);
 
 #ifndef __MEM_cache_limiter_h_included__
 extern void MEM_CacheLimiter_set_maximum(int m);
-extern int MEM_CacheLimiter_get_maximum();
+extern int MEM_CacheLimiter_get_maximum(void);
 #endif
 /** 
  * Create new MEM_CacheLimiter object 
index 9960511..46a2265 100644 (file)
@@ -24,6 +24,9 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
+# External project, better not fix warnings.
+REMOVE_STRICT_FLAGS()
+
 SET(INC
        extern
        superlu
index be76aa9..c87cb7e 100644 (file)
@@ -136,7 +136,7 @@ void nlMatrixMultiply(NLfloat *x, NLfloat *y);
 /* Solve */
 
 void nlPrintMatrix(void);
-NLboolean nlSolve();
+NLboolean nlSolve(void);
 NLboolean nlSolveAdvanced(NLint *permutation, NLboolean solveAgain);
 
 #ifdef __cplusplus
index 1a3526d..953242d 100644 (file)
@@ -246,7 +246,7 @@ extern void    heap_relax_snode (const int, int *, const int, int *, int *);
 extern void    resetrep_col (const int, const int *, int *);
 extern int     spcoletree (int *, int *, int *, int, int, int *);
 extern int     *TreePostorder (int, int *);
-extern double  SuperLU_timer_ ();
+extern double  SuperLU_timer_ (void);
 extern int     sp_ienv (int);
 extern int     lsame_ (char *, char *);
 extern int     xerbla_ (char *, int *);
index 2521918..42cbd22 100644 (file)
@@ -68,7 +68,7 @@ void BKE_icon_delete(struct ID* id);
 void BKE_icon_changed(int icon_id);
 
 /* free all icons */
-void BKE_icons_free();
+void BKE_icons_free(void);
 
 /* free the preview image */
 void BKE_previewimg_free(struct PreviewImage **prv);
@@ -77,7 +77,7 @@ void BKE_previewimg_free(struct PreviewImage **prv);
 void BKE_previewimg_free_id(ID *id);
 
 /* create a new preview image */
-struct PreviewImage* BKE_previewimg_create() ;
+struct PreviewImage* BKE_previewimg_create(void) ;
 
 /* create a copy of the preview image */
 struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv);
index 1a9fb2d..e3b6ebd 100644 (file)
@@ -113,7 +113,7 @@ struct SeqEffectHandle {
        
        /* number of input strips needed 
                (called directly after construction) */
-       int (*num_inputs)();
+       int (*num_inputs)(void);
        
        /* load is called first time after readblenfile in
                get_sequence_effect automatically */
@@ -208,10 +208,10 @@ typedef enum {
        SEQ_STRIPELEM_IBUF_ENDSTILL
 } seq_stripelem_ibuf_t;
 
-void seq_stripelem_cache_init();
-void seq_stripelem_cache_destruct();
+void seq_stripelem_cache_init(void);
+void seq_stripelem_cache_destruct(void);
 
-void seq_stripelem_cache_cleanup();
+void seq_stripelem_cache_cleanup(void);
 
 struct ImBuf * seq_stripelem_cache_get(
        SeqRenderData context, struct Sequence * seq, 
index c46604f..a59464b 100644 (file)
@@ -113,12 +113,12 @@ typedef struct SK_Gesture {
 /************************************************/
 
 void freeSketch(SK_Sketch *sketch);
-SK_Sketch* createSketch();
+SK_Sketch* createSketch(void);
 
 void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
 
 void sk_freeStroke(SK_Stroke *stk);
-SK_Stroke* sk_createStroke();
+SK_Stroke* sk_createStroke(void);
 
 SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
 
index fb1a3c4..2d4ea81 100644 (file)
@@ -38,11 +38,11 @@ struct ListBase;
 struct Main;
 struct Sequence;
 
-void sound_init_once();
+void sound_init_once(void);
 
 void sound_init(struct Main *main);
 
-void sound_exit();
+void sound_exit(void);
 
 void sound_force_device(int device);
 int sound_define_from_str(char *str);
index 59369d6..9eb8897 100644 (file)
@@ -64,27 +64,27 @@ typedef struct SuggList {
 } SuggList;
 
 /* Free all text tool memory */
-void free_texttools();
+void free_texttools(void);
 
 /* Used to identify which Text object the current tools should appear against */
 void texttool_text_set_active(Text *text);
-void texttool_text_clear();
+void texttool_text_clear(void);
 short texttool_text_is_active(Text *text);
 
 /* Suggestions */
 void texttool_suggest_add(const char *name, char type);
 void texttool_suggest_prefix(const char *prefix);
-void texttool_suggest_clear();
-SuggItem *texttool_suggest_first();
-SuggItem *texttool_suggest_last();
+void texttool_suggest_clear(void);
+SuggItem *texttool_suggest_first(void);
+SuggItem *texttool_suggest_last(void);
 void texttool_suggest_select(SuggItem *sel);
-SuggItem *texttool_suggest_selected();
-int *texttool_suggest_top();
+SuggItem *texttool_suggest_selected(void);
+int *texttool_suggest_top(void);
 
 /* Documentation */
 void texttool_docs_show(const char *docs);
-char *texttool_docs_get();
-void texttool_docs_clear();
+char *texttool_docs_get(void);
+void texttool_docs_clear(void);
 
 #ifdef __cplusplus
 }
index b781b18..2469f7f 100644 (file)
@@ -65,7 +65,7 @@ void tend ( void )
 {
        gettimeofday ( &_tend,&tz );
 }
-double tval()
+double tval(void)
 {
        double t1, t2;
        t1 = ( double ) _tstart.tv_sec + ( double ) _tstart.tv_usec/ ( 1000*1000 );
index c1a6200..f92f232 100644 (file)
@@ -3903,7 +3903,7 @@ static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES];
 static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */
 
 /* This function only gets called when CTI_INIT is non-zero */
-static void constraints_init_typeinfo () {
+static void constraints_init_typeinfo (void) {
        constraintsTypeInfo[0]=  NULL;                                  /* 'Null' Constraint */
        constraintsTypeInfo[1]=  &CTI_CHILDOF;                  /* ChildOf Constraint */
        constraintsTypeInfo[2]=  &CTI_TRACKTO;                  /* TrackTo Constraint */
index 5ef41d1..1ed8241 100644 (file)
@@ -932,7 +932,7 @@ static FModifierTypeInfo *fmodifiersTypeInfo[FMODIFIER_NUM_TYPES];
 static short FMI_INIT= 1; /* when non-zero, the list needs to be updated */
 
 /* This function only gets called when FMI_INIT is non-zero */
-static void fmods_init_typeinfo () 
+static void fmods_init_typeinfo (void
 {
        fmodifiersTypeInfo[0]=  NULL;                                   /* 'Null' F-Curve Modifier */
        fmodifiersTypeInfo[1]=  &FMI_GENERATOR;                 /* Generator F-Curve Modifier */
index 7830670..30e4318 100644 (file)
@@ -76,7 +76,7 @@ static void icon_free(void *val)
 
 /* create an id for a new icon and make sure that ids from deleted icons get reused
    after the integer number range is used up */
-static int get_next_free_id()
+static int get_next_free_id(void)
 {
        int startId = gFirstIconId;
 
index bdf71a8..3d6710b 100644 (file)
@@ -85,7 +85,7 @@ static void itend(void)
 {
        gettimeofday(&_itend,&itz);
 }
-double itval()
+double itval(void)
 {
        double t1, t2;
        t1 =  (double)_itstart.tv_sec + (double)_itstart.tv_usec/(1000*1000);
index 8096f02..ac61aca 100644 (file)
@@ -1402,7 +1402,7 @@ void paste_matcopybuf(Material *ma)
                MEM_freeN(ma->nodetree);
        }
 
-       GPU_materials_free(ma);
+       GPU_material_free(ma);
 
        id= (ma->id);
        memcpy(ma, &matcopybuf, sizeof(Material));
index 2efef52..c11b51b 100644 (file)
@@ -119,8 +119,8 @@ static struct ImBuf * prepare_effect_imbufs(
 
 static void open_plugin_seq(PluginSeq *pis, const char *seqname)
 {
-       int (*version)();
-       void* (*alloc_private)();
+       int (*version)(void);
+       void* (*alloc_private)(void);
        char *cp;
 
        /* to be sure: (is tested for) */
@@ -143,7 +143,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
 
        if (pis->handle != 0) {
                /* find the address of the version function */
-               version= (int (*)())PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
+               version= (int (*)(void))PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
                if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
 
                if (version != 0) {
@@ -177,7 +177,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
                                return;
                        }
                }
-               alloc_private = (void* (*)())PIL_dynlib_find_symbol(
+               alloc_private = (void* (*)(void))PIL_dynlib_find_symbol(
                        pis->handle, "plugin_seq_alloc_private_data");
                if (alloc_private) {
                        pis->instance_private_data = alloc_private();
@@ -246,7 +246,7 @@ static void init_plugin(Sequence * seq, const char * fname)
 /* 
  * FIXME: should query plugin! Could be generator, that needs zero inputs...
  */
-static int num_inputs_plugin()
+static int num_inputs_plugin(void)
 {
        return 1;
 }
@@ -969,7 +969,7 @@ static void gamtabs(float gamma)
 
 }
 
-static void build_gammatabs()
+static void build_gammatabs(void)
 {
        if (gamma_tabs_init == FALSE) {
                gamtabs(2.0f);
@@ -1860,7 +1860,7 @@ static void init_wipe_effect(Sequence *seq)
        seq->effectdata = MEM_callocN(sizeof(struct WipeVars), "wipevars");
 }
 
-static int num_inputs_wipe()
+static int num_inputs_wipe(void)
 {
        return 1;
 }
@@ -2044,7 +2044,7 @@ static void init_transform_effect(Sequence *seq)
        transform->uniform_scale=0;
 }
 
-static int num_inputs_transform()
+static int num_inputs_transform(void)
 {
        return 1;
 }
@@ -2613,7 +2613,7 @@ static void init_glow_effect(Sequence *seq)
        glow->bNoComp = 0;
 }
 
-static int num_inputs_glow()
+static int num_inputs_glow(void)
 {
        return 1;
 }
@@ -2700,7 +2700,7 @@ static void init_solid_color(Sequence *seq)
        cv->col[0] = cv->col[1] = cv->col[2] = 0.5;
 }
 
-static int num_inputs_color()
+static int num_inputs_color(void)
 {
        return 0;
 }
@@ -2809,7 +2809,7 @@ static struct ImBuf * do_solid_color(
    ********************************************************************** */
 
 /* no effect inputs for multicam, we use give_ibuf_seq */
-static int num_inputs_multicam()
+static int num_inputs_multicam(void)
 {
        return 0;
 }
@@ -2884,7 +2884,7 @@ static void load_speed_effect(Sequence * seq)
        v->length = 0;
 }
 
-static int num_inputs_speed()
+static int num_inputs_speed(void)
 {
        return 1;
 }
@@ -3059,7 +3059,7 @@ static void free_noop(struct Sequence *UNUSED(seq))
 
 }
 
-static int num_inputs_default()
+static int num_inputs_default(void)
 {
        return 2;
 }
index 978b3c9..ceee544 100644 (file)
@@ -1659,7 +1659,7 @@ static void *exec_scan_for_ext_spring_forces(void *data)
        return 0;
 }
 
-static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func()))
+static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func(void)))
 {
        ListBase *do_effector = NULL;
        ListBase threads;
@@ -2175,7 +2175,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
 /* since this is definitely the most CPU consuming task here .. try to spread it */
 /* core function _softbody_calc_forces_slice_in_a_thread */
 /* result is int to be able to flag user break */
-static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func()),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func(void)),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
 {
        float iks;
        int bb,do_selfcollision,do_springcollision,do_aero;
@@ -2386,7 +2386,7 @@ static void *exec_softbody_calc_forces(void *data)
        return 0;
 }
 
-static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func()),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func(void)),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
 {
        ListBase threads;
        SB_thread_context *sb_threads;
index 1b720c1..7d39203 100644 (file)
@@ -54,7 +54,7 @@ static int txttl_cmp(const char *first, const char *second, int len) {
        return cmp;
 }
 
-static void txttl_free_suggest() {
+static void txttl_free_suggest(void) {
        SuggItem *item, *prev;
        for (item = suggestions.last; item; item=prev) {
                prev = item->prev;
@@ -66,7 +66,7 @@ static void txttl_free_suggest() {
        suggestions.top = 0;
 }
 
-static void txttl_free_docs() {
+static void txttl_free_docs(void) {
        if (documentation) {
                MEM_freeN(documentation);
                documentation = NULL;
index bdb8d11..b78525d 100644 (file)
@@ -93,7 +93,7 @@ TMARK_EDITALL is set the group ID defines which other markers should be edited.
 The mrk->clr field is used to visually group markers where the flags may not
 match. A template system, for example, may allow editing of repeating tokens
 (in one group) but include other marked positions (in another group) all in the
-same template with the same colour.
+same template with the same color.
 
 Undo
 --
index bbc441f..3bdfd6c 100644 (file)
@@ -77,16 +77,16 @@ static int select_was_interrupted_by_signal()
        return (WSAGetLastError() == WSAEINTR);
 }
 #else
-static int startup_socket_system()
+static int startup_socket_system(void)
 {
        return 1;
 }
 
-static void shutdown_socket_system()
+static void shutdown_socket_system(void)
 {
 }
 
-static int select_was_interrupted_by_signal()
+static int select_was_interrupted_by_signal(void)
 {
        return (errno == EINTR);
 }
@@ -367,7 +367,7 @@ int append_frameserver(RenderData *UNUSED(rd), int frame, int *pixels, int rectx
        return 0;
 }
 
-void end_frameserver()
+void end_frameserver(void)
 {
        if (connsock != -1) {
                closesocket(connsock);
index 0e98518..122385c 100644 (file)
@@ -190,7 +190,7 @@ BM_INLINE void BLI_ghash_insert(GHash *gh, void *key, void *val) {
        gh->buckets[hash]= e;
        
        if (++gh->nentries>(float)gh->nbuckets/2) {
-               Entry *e, **old= gh->buckets;
+               Entry **old= gh->buckets;
                int i, nold= gh->nbuckets;
                
                gh->nbuckets= hashsizes[++gh->cursize];
index 6a0a711..ad968de 100644 (file)
@@ -121,7 +121,7 @@ void BLI_insert_work(struct ThreadedWorker *worker, void *param);
 
 typedef struct ThreadQueue ThreadQueue;
 
-ThreadQueue *BLI_thread_queue_init();
+ThreadQueue *BLI_thread_queue_init(void);
 void BLI_thread_queue_free(ThreadQueue *queue);
 
 void BLI_thread_queue_push(ThreadQueue *queue, void *work);
index c481744..09a419b 100644 (file)
@@ -448,7 +448,7 @@ void minmax_rgb(short c[])
 }
 
 /*If the requested RGB shade contains a negative weight for
-  one of the primaries, it lies outside the colour gamut 
+  one of the primaries, it lies outside the color gamut 
   accessible from the given triple of primaries.  Desaturate
   it by adding white, equal quantities of R, G, and B, enough
   to make RGB all positive.  The function returns 1 if the
index 7144a7d..70d9d08 100644 (file)
@@ -289,7 +289,7 @@ void BLI_builddir(const char *dirname, char *relname)
        }
 }
 
-void BLI_adddirstrings()
+void BLI_adddirstrings(void)
 {
        char datum[100];
        char buf[512];
index 4bc2654..13cbfee 100644 (file)
@@ -172,14 +172,14 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
 /* step between the major distinguishable color bands of the primary colors */
 #define HSV_BANDWIDTH  0.3f
 
-/* used to determine the colour of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
+/* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
 //void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out)
 void getcolor_fcurve_rainbow (int cur, int tot, float *out)
 {
        float hue, val, sat, fac;
        int grouping;
        
-       /* we try to divide the colours into groupings of n colors,
+       /* we try to divide the color into groupings of n colors,
         * where n is:
         *      3 - for 'odd' numbers of curves - there should be a majority of triplets of curves
         *      4 - for 'even' numbers of curves - there should be a majority of quartets of curves
index 5d96c01..9c801d9 100644 (file)
@@ -603,7 +603,7 @@ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi)
 
 /* --------------- */
 
-void ANIM_keyingset_infos_exit ()
+void ANIM_keyingset_infos_exit (void)
 {
        KeyingSetInfo *ksi, *next;
        
index 2f6bccf..9260a3a 100644 (file)
@@ -1212,16 +1212,10 @@ void ARMATURE_OT_separate (wmOperatorType *ot)
 /* only for opengl selection indices */
 Bone *get_indexed_bone (Object *ob, int index)
 {
-       bPoseChannel *pchan;
-       int a= 0;
-       
        if(ob->pose==NULL) return NULL;
        index>>=16;             // bone selection codes use left 2 bytes
        
-       for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
-               if(a==index) return pchan->bone;
-       }
-       return NULL;
+       return BLI_findlink(&ob->pose->chanbase, index);
 }
 
 /* See if there are any selected bones in this buffer */
@@ -1780,7 +1774,7 @@ EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
 static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
 {
        bArmature *arm;
-       EditBone        *curBone, *next;
+       EditBone        *curBone, *ebone_next;
        bConstraint *con;
        Object *obedit= CTX_data_edit_object(C); // XXX get from context
        arm = obedit->data;
@@ -1794,9 +1788,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
                for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
                        if (arm->layer & curBone->layer) {
                                if (curBone->flag & BONE_SELECTED) {
-                                       next = ED_armature_bone_get_mirrored(arm->edbo, curBone);
-                                       if (next)
-                                               next->flag |= BONE_SELECTED;
+                                       ebone_next= ED_armature_bone_get_mirrored(arm->edbo, curBone);
+                                       if (ebone_next)
+                                               ebone_next->flag |= BONE_SELECTED;
                                }
                        }
                }
@@ -1804,9 +1798,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
        
        /*  First erase any associated pose channel */
        if (obedit->pose) {
-               bPoseChannel *pchan, *next;
-               for (pchan=obedit->pose->chanbase.first; pchan; pchan=next) {
-                       next= pchan->next;
+               bPoseChannel *pchan, *pchan_next;
+               for (pchan=obedit->pose->chanbase.first; pchan; pchan= pchan_next) {
+                       pchan_next= pchan->next;
                        curBone = editbone_name_exists(arm->edbo, pchan->name);
                        
                        if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
@@ -1844,8 +1838,8 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
        }
        
        
-       for (curBone=arm->edbo->first;curBone;curBone=next) {
-               next=curBone->next;
+       for (curBone=arm->edbo->first; curBone; curBone= ebone_next) {
+               ebone_next= curBone->next;
                if (arm->layer & curBone->layer) {
                        if (curBone->flag & BONE_SELECTED) {
                                if(curBone==arm->act_edbone) arm->act_edbone= NULL;
index 5ef13bc..d043c2e 100644 (file)
@@ -304,7 +304,7 @@ void RIG_freeRigGraph(BGraph *rg)
 
 /************************************* ALLOCATORS ******************************************************/
 
-static RigGraph *newRigGraph()
+static RigGraph *newRigGraph(void)
 {
        RigGraph *rg;
        int totthread;
@@ -1535,8 +1535,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
        
        if (obedit == ob)
        {
-               bArmature *arm = obedit->data;
-               rg->editbones = arm->edbo;
+               rg->editbones = ((bArmature *)obedit->data)->edbo;
        }
        else
        {
@@ -2792,7 +2791,7 @@ int RIG_nbJoints(RigGraph *rg)
        return total;
 }
 
-void BIF_freeRetarget()
+void BIF_freeRetarget(void)
 {
        if (GLOBAL_RIGG)
        {
index f193def..e93775f 100644 (file)
@@ -63,8 +63,8 @@
 /* ************* XXX *************** */
 static void waitcursor(int UNUSED(val)) {}
 static void progress_bar(int UNUSED(dummy_val), const char *UNUSED(dummy)) {}
-static void start_progress_bar() {}
-static void end_progress_bar() {}
+static void start_progress_bar(void) {}
+static void end_progress_bar(void) {}
 static void error(char *str) { printf("error: %s\n", str); }
 /* ************* XXX *************** */
 
index d143080..2ec940d 100644 (file)
@@ -73,7 +73,7 @@
 
 /* ******* XXX ********** */
 
-static void action_set_activemarker() {}
+static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUSED(c)) {}
 
 /* ************************************************************* */
 /* == POSE-LIBRARY TOOL FOR BLENDER == 
index 6b12baf..db2e8eb 100644 (file)
@@ -833,9 +833,7 @@ void pose_copy_menu(Scene *scene)
                                 * appending to list of constraints for this channel
                                 */
                                copy_constraints(&tmp_constraints, &const_copy, TRUE);
-                               if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
-                                       bConstraint *con;
-                                       
+                               if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {                                       
                                        /* add proxy-local tags */
                                        for (con= tmp_constraints.first; con; con= con->next)
                                                con->flag |= CONSTRAINT_PROXY_LOCAL;
index 3bebc42..39f8340 100644 (file)
@@ -149,7 +149,7 @@ void angleToVCol(struct EditMesh *em, int index);
 void renormalizeWeight(struct EditMesh *em, float newmax);
 
 ReebGraph * generateReebGraph(struct EditMesh *me, int subdivisions);
-ReebGraph * newReebGraph();
+ReebGraph * newReebGraph(void);
 
 void initArcIterator(BArcIterator *iter, struct ReebArc *arc, struct ReebNode *head);
 void initArcIterator2(BArcIterator *iter, struct ReebArc *arc, int start, int end);
@@ -195,7 +195,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node);
 void REEB_freeGraph(ReebGraph *rg);
 void REEB_freeArc(BArc *barc);
 void REEB_exportGraph(ReebGraph *rg, int count);
-void REEB_draw();
+void REEB_draw(void);
 
 
 #endif /*REEB_H_*/
index a2441a8..5a328d4 100644 (file)
@@ -5978,8 +5978,6 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
                break;
        case CU_PRIM_TUBE:      /* Cylinder */
                if( cutype==CU_NURBS ) {
-                       Curve *cu= (Curve*)obedit->data;
-                       
                        nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0);  /* circle */
                        nu->resolu= cu->resolu;
                        nu->flag= CU_SMOOTH;
index 8f37baf..3fa07da 100644 (file)
@@ -197,7 +197,7 @@ void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect);
 /* use this for platform hacks. glPointSize is solved here */
 void bglBegin(int mode);
 void bglEnd(void);
-int bglPointHack();
+int bglPointHack(void);
 void bglVertex3fv(float *vec);
 void bglVertex3f(float x, float y, float z);
 void bglVertex2fv(float *vec);
index b698cd6..34a390b 100644 (file)
@@ -62,7 +62,7 @@ void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspec
 void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
 void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
 void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
-void UI_icons_free();
+void UI_icons_free(void);
 void UI_icons_free_drawinfo(void *drawinfo);
 
 struct ListBase *UI_iconfile_list(void);
index 0f298f5..be54e6a 100644 (file)
@@ -386,7 +386,7 @@ void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad
        float raddiff;
        int i, passes=4;
        
-       /* get the colour and divide up the alpha */
+       /* get the color and divide up the alpha */
        glGetFloatv(GL_CURRENT_COLOR, color);
        alpha = 1; //color[3];
        color[3]= 0.5*alpha/(float)passes;
index 22f1771..8724b7f 100644 (file)
@@ -1068,19 +1068,19 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
 
        /* text/string and ID data */
        else if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
-               uiHandleButtonData *data= but->active;
+               uiHandleButtonData *active_data= but->active;
 
                if(but->poin==NULL && but->rnapoin.data==NULL);
                else if(mode=='c') {
                        button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
-                       BLI_strncpy(buf, data->str, UI_MAX_DRAW_STR);
-                       WM_clipboard_text_set(data->str, 0);
-                       data->cancel= 1;
+                       BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR);
+                       WM_clipboard_text_set(active_data->str, 0);
+                       active_data->cancel= 1;
                        button_activate_state(C, but, BUTTON_STATE_EXIT);
                }
                else {
                        button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
-                       BLI_strncpy(data->str, buf, data->maxlen);
+                       BLI_strncpy(active_data->str, buf, active_data->maxlen);
                        button_activate_state(C, but, BUTTON_STATE_EXIT);
                }
        }
@@ -1281,7 +1281,7 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc
        return changed;
 }
 
-void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
+static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
 {
        char *str;
        int len;
@@ -1384,7 +1384,7 @@ void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int s
        }
 }
 
-void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
+static void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
 {
        char *str;
 
index e39e594..8533e5b 100644 (file)
@@ -455,7 +455,7 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha)
        glDisable(GL_LINE_SMOOTH);
 }
 
-static void init_brush_icons()
+static void init_brush_icons(void)
 {
 
 #define INIT_BRUSH_ICON(icon_id, name)                                      \
@@ -500,7 +500,7 @@ static void init_brush_icons()
 #undef INIT_BRUSH_ICON
 }
 
-static void init_internal_icons()
+static void init_internal_icons(void)
 {
        bTheme *btheme= U.themes.first;
        ImBuf *bbuf= NULL;
@@ -731,7 +731,7 @@ void UI_icons_free_drawinfo(void *drawinfo)
        }
 }
 
-static DrawInfo *icon_create_drawinfo()
+static DrawInfo *icon_create_drawinfo(void)
 {
        DrawInfo *di = NULL;
 
index 4e66974..4c16625 100644 (file)
@@ -716,17 +716,17 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
                for(i=0; i<totitem; i++) {
                        if(item[i].identifier[0]) {
                                if(properties) {
-                                       PointerRNA ptr;
+                                       PointerRNA tptr;
 
-                                       WM_operator_properties_create(&ptr, opname);
-                                       if(ptr.data) {
-                                               IDP_FreeProperty(ptr.data);
-                                               MEM_freeN(ptr.data);
+                                       WM_operator_properties_create(&tptr, opname);
+                                       if(tptr.data) {
+                                               IDP_FreeProperty(tptr.data);
+                                               MEM_freeN(tptr.data);
                                        }
-                                       ptr.data= IDP_CopyProperty(properties);
-                                       RNA_enum_set(&ptr, propname, item[i].value);
+                                       tptr.data= IDP_CopyProperty(properties);
+                                       RNA_enum_set(&tptr, propname, item[i].value);
 
-                                       uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, ptr.data, context, flag);
+                                       uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, tptr.data, context, flag);
                                }
                                else
                                        uiItemEnumO(column, opname, (char*)item[i].name, item[i].icon, propname, item[i].value);
@@ -2548,7 +2548,7 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
        /* XXX silly trick, interface_templates.c doesn't get linked
         * because it's not used by other files in this module? */
        {
-               void ui_template_fix_linking();
+               void ui_template_fix_linking(void);
                ui_template_fix_linking();
        }
 }
index 0747d77..6b834c0 100644 (file)
@@ -1833,7 +1833,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
        width= PICKER_TOTAL_W;
        butwidth = width - UI_UNIT_X - 10;
        
-       /* existence of profile means storage is in linear colour space, with display correction */
+       /* existence of profile means storage is in linear color space, with display correction */
        if (block->color_profile == BLI_PR_NONE) {
                sprintf(tip, "Value in Display Color Space");
                copy_v3_v3(rgb_gamma, rgb);
index 75daa76..ae75bd0 100644 (file)
@@ -55,7 +55,7 @@
 
 #include "BLF_api.h"
 
-void ui_template_fix_linking()
+void ui_template_fix_linking(void)
 {
 }
 
@@ -1959,7 +1959,6 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon)
 
 static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, const char *activepropname)
 {
-       Object *ob;
        uiBlock *block= uiLayoutGetBlock(layout);
        uiBut *but;
        uiLayout *split, *overlap, *sub, *row;
@@ -2024,7 +2023,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
                }
        }
        else if(itemptr->type == &RNA_ShapeKey) {
-               ob= (Object*)activeptr->data;
+               Object *ob= (Object*)activeptr->data;
 
                split= uiLayoutSplit(sub, 0.75f, 0);
 
@@ -2324,9 +2323,9 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
        }
 
        if(WM_jobs_test(wm, owner)) {
-               uiLayout *abs;
+               uiLayout *ui_abs;
                
-               abs = uiLayoutAbsolute(layout, 0);
+               ui_abs= uiLayoutAbsolute(layout, 0);
                
                uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE, 
                                0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job");
@@ -2349,7 +2348,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
        Report *report= BKE_reports_last_displayable(reports);
        ReportTimerInfo *rti;
        
-       uiLayout *abs;
+       uiLayout *ui_abs;
        uiBlock *block;
        uiBut *but;
        uiStyle *style= U.uistyles.first;
@@ -2363,8 +2362,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
        
        if (!rti || rti->widthfac==0.0 || !report) return;
        
-       abs = uiLayoutAbsolute(layout, 0);
-       block= uiLayoutGetBlock(abs);
+       ui_abs= uiLayoutAbsolute(layout, 0);
+       block= uiLayoutGetBlock(ui_abs);
        
        width = BLF_width(style->widget.uifont_id, report->message);
        width = MIN2(rti->widthfac*width, width);
@@ -2373,7 +2372,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
        /* make a box around the report to make it stand out */
        uiBlockBeginAlign(block);
        but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
-       /* set the report's bg colour in but->col - ROUNDBOX feature */
+       /* set the report's bg color in but->col - ROUNDBOX feature */
        but->col[0]= FTOCHAR(rti->col[0]);
        but->col[1]= FTOCHAR(rti->col[1]);
        but->col[2]= FTOCHAR(rti->col[2]);
index 2a6ab52..403c700 100644 (file)
@@ -24,7 +24,6 @@
  */
 
 #include <limits.h>
-#include <math.h>
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -1120,7 +1119,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
  
 */
 
-static struct uiWidgetStateColors wcol_state= {
+static struct uiWidgetStateColors wcol_state_colors= {
        {115, 190, 76, 255},
        {90, 166, 51, 255},
        {240, 235, 100, 255},
@@ -1390,7 +1389,7 @@ void ui_widget_color_init(ThemeUI *tui)
        tui->wcol_list_item= wcol_list_item;
        tui->wcol_progress= wcol_progress;
 
-       tui->wcol_state= wcol_state;
+       tui->wcol_state= wcol_state_colors;
 }
 
 /* ************ button callbacks, state ***************** */
@@ -2325,10 +2324,10 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
        ui_get_but_vectorf(but, col);
        
        if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
-               // draw based on state - colour for keyed etc
+               // draw based on state - color for keyed etc
                widgetbase_draw(&wtb, wcol);
                
-               // inset to draw swatch colour
+               // inset to draw swatch color
                rect->xmin+= SWATCH_KEYED_BORDER;
                rect->xmax-= SWATCH_KEYED_BORDER;
                rect->ymin+= SWATCH_KEYED_BORDER;
@@ -2496,7 +2495,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(
        
        VECCOPY(old_col, wcol->inner);
        
-       /* abuse but->hsv - if it's non-zero, use this colour as the box's background */
+       /* abuse but->hsv - if it's non-zero, use this color as the box's background */
        if (but->col[3]) {
                wcol->inner[0] = but->col[0];
                wcol->inner[1] = but->col[1];
index b6fa091..2bc72d7 100644 (file)
@@ -1182,7 +1182,7 @@ void init_userdef_do_versions(void)
        if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) {
                bTheme *btheme;
                for (btheme= U.themes.first; btheme; btheme= btheme->next) {
-                       /* these should all use the same colour */
+                       /* these should all use the same color */
                        SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
                        SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
                        SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
index 6be2a01..af63b9c 100644 (file)
@@ -1167,7 +1167,7 @@ typedef struct v2dScrollerMove {
        ARegion *ar;                    /* region that the scroller is in */
        
        short scroller;                 /* scroller that mouse is in ('h' or 'v') */
-       short zone;                             /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active colour?)
+       short zone;                             /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?)
        
        float fac;                              /* view adjustment factor, based on size of region */
        float delta;                    /* amount moved by mouse on axis of interest */
index 424b3c5..99b3d4e 100644 (file)
@@ -918,9 +918,9 @@ void make_editMesh(Scene *scene, Object *ob)
 }
 
 /* makes Mesh out of editmesh */
-void load_editMesh(Scene *scene, Object *ob)
+void load_editMesh(Scene *scene, Object *obedit)
 {
-       Mesh *me= ob->data;
+       Mesh *me= obedit->data;
        MVert *mvert, *oldverts;
        MEdge *medge;
        MFace *mface;
@@ -1110,7 +1110,7 @@ void load_editMesh(Scene *scene, Object *ob)
                Object *ob;
                ModifierData *md;
                EditVert **vertMap = NULL;
-               int i,j;
+               int j;
 
                for (ob=G.main->object.first; ob; ob=ob->id.next) {
                        if (ob->parent==ob && ELEM(ob->partype, PARVERT1,PARVERT3)) {
@@ -1310,7 +1310,7 @@ void load_editMesh(Scene *scene, Object *ob)
        mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
 
        /* topology could be changed, ensure mdisps are ok */
-       multires_topology_changed(ob);
+       multires_topology_changed(obedit);
 }
 
 void remake_editMesh(Scene *scene, Object *ob)
index 2e095af..70fcca0 100644 (file)
@@ -70,9 +70,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
 
 /* **** XXX ******** */
 static void BIF_undo_push(const char *UNUSED(arg)) {}
-static void BIF_undo() {}
+static void BIF_undo(void) {}
 static void error(const char *UNUSED(arg)) {}
-static int qtest() {return 0;}
+static int qtest(void) {return 0;}
 /* **** XXX ******** */
 
 
index c993427..af03df3 100644 (file)
@@ -35,12 +35,10 @@ editmesh_mods.c, UI level access, no geometry changes
 
 #include <stdlib.h>
 #include <string.h>
-#include <math.h>
 
 #include "MEM_guardedalloc.h"
 
 
-
 #include "DNA_material_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
@@ -139,14 +137,13 @@ void EM_automerge(Scene *scene, Object *obedit, int update)
                (obedit && obedit->type==OB_MESH && (obedit->mode & OB_MODE_EDIT)) &&
                (me->mr==NULL)
          ) {
-               Mesh *me= (Mesh*)obedit->data;
                EditMesh *em= me->edit_mesh;
 
                len = removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
                if (len) {
                        em->totvert -= len; /* saves doing a countall */
                        if (update) {
-                               DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+                               DAG_id_flush_update(&me->id, OB_RECALC_DATA);
                        }
                }
        }
index 2a04859..8adf504 100644 (file)
@@ -3554,7 +3554,7 @@ static const EnumPropertyItem direction_items[]= {
 #define AXIS_X         1
 #define AXIS_Y         2
 
-static const EnumPropertyItem axis_items[]= {
+static const EnumPropertyItem axis_items_xy[]= {
        {AXIS_X, "X", 0, "X", ""},
        {AXIS_Y, "Y", 0, "Y", ""},
        {0, NULL, 0, NULL, NULL}};
@@ -6701,7 +6701,7 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* props */
-       RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
+       RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
 }
 
 void MESH_OT_colors_rotate(wmOperatorType *ot)
@@ -6737,7 +6737,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* props */
-       RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
+       RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
 }
 
 /********************** Subdivide Operator *************************/
@@ -7493,7 +7493,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
                {-1, "ALIGNED",  0, "Aligned Axis", ""},
                {0, NULL, 0, NULL, NULL}};
        
-       static EnumPropertyItem axis_items[] = {
+       static EnumPropertyItem axis_items_xyz[] = {
                {0, "X_AXIS", 0, "X Axis", ""},
                {1, "Y_AXIS", 0, "Y Axis", ""},
                {2, "Z_AXIS", 0, "Z Axis", ""},
@@ -7513,6 +7513,6 @@ void MESH_OT_select_axis(wmOperatorType *ot)
 
        /* properties */
        RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting");
-       RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Select the axis to compare each vertex on");
+       RNA_def_enum(ot->srna, "axis", axis_items_xyz, 0, "Axis", "Select the axis to compare each vertex on");
 }
 
index b7c4011..820e287 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <stddef.h>
 #include <stdlib.h>
-#include <string.h>
 #include <math.h>
 #include <float.h>
 
index d9e0140..a077e98 100644 (file)
@@ -102,8 +102,8 @@ static void waitcursor(int UNUSED(val)) {}
 static int pupmenu(const char *UNUSED(msg)) {return 0;}
 
 /* port over here */
-static bContext *C;
-static void error_libdata() {}
+static bContext *evil_C;
+static void error_libdata(void) {}
 
 
 /* find the correct active object per context
@@ -1078,13 +1078,13 @@ static void copymenu_modifiers(Main *bmain, Scene *scene, View3D *v3d, Object *o
        for (base= FIRSTBASE; base; base= base->next) {
                if(base->object != ob) {
                        if(TESTBASELIB(v3d, base)) {
-                               ModifierData *md;
 
                                base->object->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
 
                                if (base->object->type==ob->type) {
                                        /* copy all */
                                        if (event==NUM_MODIFIER_TYPES) {
+                                               ModifierData *md;
                                                object_free_modifiers(base->object);
 
                                                for (md=ob->modifiers.first; md; md=md->next) {
@@ -1805,7 +1805,7 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
 // XXX if(fbutton(&offset, -10000.0f, 10000.0f, 10, 10, "Offset")==0) return;
 
        /* make array of all bases, xco yco (screen) */
-       CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+       CTX_DATA_BEGIN(evil_C, Object*, ob, selected_editable_objects) {
                ob->sf += offset;
                if (ob->sf < -MAXFRAMEF)                ob->sf = -MAXFRAMEF;
                else if (ob->sf > MAXFRAMEF)    ob->sf = MAXFRAMEF;
@@ -1818,17 +1818,17 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
 void rand_timeoffs(Scene *scene, View3D *v3d)
 {
        Base *base;
-       float rand=0.0f;
+       float rand_ofs=0.0f;
 
        if(BASACT==0 || v3d==NULL) return;
        
-// XXX if(fbutton(&rand, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
+// XXX if(fbutton(&rand_ofs, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
        
-       rand *= 2;
+       rand_ofs *= 2;
        
        for(base= FIRSTBASE; base; base= base->next) {
                if(TESTBASELIB(v3d, base)) {
-                       base->object->sf += (BLI_drand()-0.5) * rand;
+                       base->object->sf += (BLI_drand()-0.5) * rand_ofs;
                        if (base->object->sf < -MAXFRAMEF)              base->object->sf = -MAXFRAMEF;
                        else if (base->object->sf > MAXFRAMEF)  base->object->sf = MAXFRAMEF;
                }
index 5c68917..22d1a2f 100644 (file)
@@ -155,7 +155,7 @@ void load_editLatt(Object *obedit)
        }
 
        if(editlt->dvert) {
-               int tot= lt->pntsu*lt->pntsv*lt->pntsw;
+               tot= lt->pntsu*lt->pntsv*lt->pntsw;
 
                lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
                copy_dverts(lt->dvert, editlt->dvert, tot);
index b131a35..deda2ce 100644 (file)
@@ -51,6 +51,7 @@
 #include "BKE_property.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
+#include "BKE_library.h"
 #include "BKE_deform.h"
 
 #include "WM_api.h"
@@ -826,21 +827,26 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
 /**************************** Select Mirror ****************************/
 static int object_select_mirror_exec(bContext *C, wmOperator *op)
 {
+       Scene *scene= CTX_data_scene(C);
        short extend;
        
        extend= RNA_boolean_get(op->ptr, "extend");
        
        CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
-
                char tmpname[32];
+
                flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
+               
+               if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
+                       Object *ob= (Object *)find_id("OB", tmpname);
+                       if(ob) {
+                               Base *secbase= object_in_scene(ob, scene);
 
-               CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) {
-                       if(!strcmp(secbase->object->id.name+2, tmpname)) {
-                               ED_base_object_select(secbase, BA_SELECT);
+                               if(secbase) {
+                                       ED_base_object_select(secbase, BA_SELECT);
+                               }
                        }
                }
-               CTX_DATA_END;
                
                if (extend == 0) ED_base_object_select(primbase, BA_DESELECT);
                
index 12370e5..cba64fe 100644 (file)
@@ -3245,8 +3245,8 @@ static int brush_add(PEData *data, short number)
 
                        if(tree) {
                                ParticleData *ppa;
-                               HairKey *hkey;
-                               ParticleKey key[3];
+                               HairKey *thkey;
+                               ParticleKey key3[3];
                                KDTreeNearest ptn[3];
                                int w, maxw;
                                float maxd, mind, dd, totw=0.0, weight[3];
@@ -3272,36 +3272,36 @@ static int brush_add(PEData *data, short number)
                                ppa= psys->particles+ptn[0].index;
 
                                for(k=0; k<pset->totaddkey; k++) {
-                                       hkey= (HairKey*)pa->hair + k;
-                                       hkey->time= pa->time + k * framestep;
+                                       thkey= (HairKey*)pa->hair + k;
+                                       thkey->time= pa->time + k * framestep;
 
-                                       key[0].time= hkey->time/ 100.0f;
-                                       psys_get_particle_on_path(&sim, ptn[0].index, key, 0);
-                                       mul_v3_fl(key[0].co, weight[0]);
+                                       key3[0].time= thkey->time/ 100.0f;
+                                       psys_get_particle_on_path(&sim, ptn[0].index, key3, 0);
+                                       mul_v3_fl(key3[0].co, weight[0]);
                                        
                                        /* TODO: interpolatint the weight would be nicer */
-                                       hkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
+                                       thkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
                                        
                                        if(maxw>1) {
-                                               key[1].time= key[0].time;
-                                               psys_get_particle_on_path(&sim, ptn[1].index, key + 1, 0);
-                                               mul_v3_fl(key[1].co, weight[1]);
-                                               VECADD(key[0].co, key[0].co, key[1].co);
+                                               key3[1].time= key3[0].time;
+                                               psys_get_particle_on_path(&sim, ptn[1].index, &key3[1], 0);
+                                               mul_v3_fl(key3[1].co, weight[1]);
+                                               VECADD(key3[0].co, key3[0].co, key3[1].co);
 
                                                if(maxw>2) {                                            
-                                                       key[2].time= key[0].time;
-                                                       psys_get_particle_on_path(&sim, ptn[2].index, key + 2, 0);
-                                                       mul_v3_fl(key[2].co, weight[2]);
-                                                       VECADD(key[0].co, key[0].co, key[2].co);
+                                                       key3[2].time= key3[0].time;
+                                                       psys_get_particle_on_path(&sim, ptn[2].index, &key3[2], 0);
+                                                       mul_v3_fl(key3[2].co, weight[2]);
+                                                       VECADD(key3[0].co, key3[0].co, key3[2].co);
                                                }
                                        }
 
                                        if(k==0)
-                                               VECSUB(co1, pa->state.co, key[0].co);
+                                               VECSUB(co1, pa->state.co, key3[0].co);
 
-                                       VECADD(hkey->co, key[0].co, co1);
+                                       VECADD(thkey->co, key3[0].co, co1);
 
-                                       hkey->time= key[0].time;
+                                       thkey->time= key3[0].time;
                                }
                        }
                        else {
index 824ff8b..5697154 100644 (file)
@@ -94,7 +94,7 @@
 #define PR_YMAX                195
 
 /* XXX */
-static int qtest() {return 0;}
+static int qtest(void) {return 0;}
 /* XXX */
 
 ImBuf* get_brush_icon(Brush *brush)
@@ -487,12 +487,12 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
        Render *re;
        RenderResult rres;
        char name[32];
-       int gamma_correct=0;
+       int do_gamma_correct=0;
        int offx=0, newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
 
        if (id && GS(id->name) != ID_TE) {
                /* exception: don't color manage texture previews - show the raw values */
-               if (sce) gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
+               if (sce) do_gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
        }
 
        if(!split || first) sprintf(name, "Preview %p", (void *)sa);
@@ -518,7 +518,7 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
                        newrect->xmax= MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
                        newrect->ymax= MAX2(newrect->ymax, rect->ymin + rres.recty);
 
-                       glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, gamma_correct);
+                       glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, do_gamma_correct);
 
                        RE_ReleaseResultImage(re);
                        return 1;
index 16bdaae..41aace4 100644 (file)
@@ -735,12 +735,12 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
 static int texture_slot_move(bContext *C, wmOperator *op)
 {
        ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
-       Material *ma = (Material *)id;
 
        if(id) {
                MTex **mtex_ar, *mtexswap;
                short act;
                int type= RNA_enum_get(op->ptr, "type");
+               struct AnimData *adt= BKE_animdata_from_id(id);
 
                give_active_mtex(id, &mtex_ar, &act);
 
@@ -750,9 +750,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
                                mtex_ar[act] = mtex_ar[act-1];
                                mtex_ar[act-1] = mtexswap;
                                
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act-1, -1, 0);
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act-1, 0);
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act-1, -1, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
 
                                if(GS(id->name)==ID_MA) {
                                        Material *ma= (Material *)id;
@@ -772,9 +772,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
                                mtex_ar[act] = mtex_ar[act+1];
                                mtex_ar[act+1] = mtexswap;
                                
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act+1, -1, 0);
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act+1, 0);
-                               BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act+1, -1, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0);
+                               BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
 
                                if(GS(id->name)==ID_MA) {
                                        Material *ma= (Material *)id;
index a6c4c77..6a9fc14 100644 (file)
@@ -26,7 +26,6 @@
  */
 
 #include <stdio.h>
-#include <math.h>
 #include <string.h>
 
 #include "MEM_guardedalloc.h"
@@ -528,7 +527,7 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *
 }
 
 /* row_w is unused but kept for completeness */
-void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int gamma_correct)
+void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int do_gamma_correct)
 {
        unsigned char *rect32;
        
@@ -537,7 +536,7 @@ void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED
        
        rect32= MEM_mallocN(img_w*img_h*sizeof(int), "temp 32 bits");
        
-       if (gamma_correct) {
+       if (do_gamma_correct) {
                floatbuf_to_srgb_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
        } else {
                floatbuf_to_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
@@ -767,13 +766,13 @@ void bglBegin(int mode)
 
 int bglPointHack() {
        float value[4];
-       int pointhack;
+       int pointhack_px;
        glGetFloatv(GL_POINT_SIZE_RANGE, value);
        if(value[1]<2.0) {
                glGetFloatv(GL_POINT_SIZE, value);
-               pointhack= floor(value[0]+0.5);
-               if(pointhack>4) pointhack= 4;
-               return pointhack;
+               pointhack_px= floor(value[0]+0.5);
+               if(pointhack_px>4) pointhack_px= 4;
+               return pointhack_px;
        }
        return 0;
 }
index bd4bae2..68a73e7 100644 (file)
@@ -3964,7 +3964,7 @@ static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, int *
 
 /* Imagepaint Partial Redraw & Dirty Region */
 
-static void imapaint_clear_partial_redraw()
+static void imapaint_clear_partial_redraw(void)
 {
        memset(&imapaintpartial, 0, sizeof(imapaintpartial));
 }
index ac56362..89f4419 100644 (file)
@@ -451,7 +451,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
        DAG_id_flush_update(&me->id, OB_RECALC_DATA);
 }
 
-/* XXX: should be re-implemented as a vertex/weight paint 'colour correct' operator
+/* XXX: should be re-implemented as a vertex/weight paint 'color correct' operator
  
 void vpaint_dogamma(Scene *scene)
 {
index 73ca3ba..d15dd79 100644 (file)
@@ -3666,7 +3666,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-void ED_operatortypes_sculpt()
+void ED_operatortypes_sculpt(void)
 {
        WM_operatortype_append(SCULPT_OT_radial_control);
        WM_operatortype_append(SCULPT_OT_brush_stroke);
index ce9a96a..c1a5453 100644 (file)
@@ -228,7 +228,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        switch (ale->type) {
                                                case ANIMTYPE_SUMMARY:
                                                {
-                                                       // FIXME: hardcoded colours - reddish color from NLA
+                                                       // FIXME: hardcoded colors - reddish color from NLA
                                                        glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
                                                }
                                                        break;
index f26bc63..d4d1429 100644 (file)
@@ -146,7 +146,7 @@ static int console_textview_line_get(struct TextViewContext *tvc, const char **l
 
 static int console_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char UNUSED(bg[3]))
 {
-       ConsoleLine *cl= (ConsoleLine *)tvc->iter;
+       ConsoleLine *cl_iter= (ConsoleLine *)tvc->iter;
 
        /* annoying hack, to draw the prompt */
        if(tvc->iter_index == 0) {
@@ -181,7 +181,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
                );
        }
 
-       console_line_color(fg, cl->type);
+       console_line_color(fg, cl_iter->type);
 
        return TVC_LINE_FG;
 }
index e8c7cc6..405c965 100644 (file)
@@ -365,7 +365,7 @@ static int insert_exec(bContext *C, wmOperator *op)
 
        // XXX, alligned tab key hack
        if(str[0]=='\t' && str[1]=='\0') {
-               int len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
+               len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
                MEM_freeN(str);
                str= MEM_mallocN(len + 1, "insert_exec");
                memset(str, ' ', len);
@@ -380,7 +380,6 @@ static int insert_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        else {
-               SpaceConsole *sc= CTX_wm_space_console(C);
                console_select_offset(sc, len);
        }
 
@@ -468,7 +467,6 @@ static int delete_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        else {
-               SpaceConsole *sc= CTX_wm_space_console(C);
                console_select_offset(sc, -1);
        }
 
@@ -616,7 +614,6 @@ static int history_append_exec(bContext *C, wmOperator *op)
        int prev_len= ci->len;
 
        if(rem_dupes) {
-               SpaceConsole *sc= CTX_wm_space_console(C);
                ConsoleLine *cl;
 
                while((cl= console_history_find(sc, ci->line, ci)))
index fc7ab28..692953a 100644 (file)
@@ -96,7 +96,7 @@ void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
 float file_shorten_string(char* string, float w, int front);
 float file_string_width(const char* str);
 
-float file_font_pointsize();
+float file_font_pointsize(void);
 void file_change_dir(bContext *C, int checkdir);
 int file_select_match(struct SpaceFile *sfile, const char *pattern);
 void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
index 9dd7ab2..eb1c46d 100644 (file)
@@ -47,8 +47,8 @@ struct rcti;
 struct ReportList;
 
 struct FileList *      filelist_new(short type);
-void                           filelist_init_icons();
-void                           filelist_free_icons();
+void                           filelist_init_icons(void);
+void                           filelist_free_icons(void);
 int                                    filelist_find(struct FileList* filelist, char *file);
 void                           filelist_free(struct FileList* filelist);
 void                           filelist_sort(struct FileList* filelist, short sort);
@@ -78,7 +78,7 @@ void                          filelist_from_library(struct FileList* filelist);
 void                           filelist_freelib(struct FileList* filelist);
 void                           filelist_hideparent(struct FileList* filelist, short hide);
 
-struct ListBase *      folderlist_new();
+struct ListBase *      folderlist_new(void);
 void                           folderlist_free(struct ListBase* folderlist);
 struct ListBase        *       folderlist_duplicate(ListBase* folderlist);
 void                           folderlist_popdir(struct ListBase* folderlist, char *dir);
index dd3672b..4d180d9 100644 (file)
@@ -620,7 +620,6 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
                        
                /* value of variable */
                if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
-                       uiLayout *row;
                        char valBuf[32];
                        
                        box= uiLayoutBox(col);
index 1f92f32..d875aaa 100644 (file)
@@ -70,7 +70,7 @@
  */
 #define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f )
 
-/* set the colour for some point from some value given packed into an int 
+/* set the color for some point from some value given packed into an int 
  *     - intV: integer value containing color info packed into an int
  *     - alpha: float value describing the 
  */
index cac56d7..970be9f 100644 (file)
@@ -484,7 +484,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl)   // IMAGE_HANDLER_PREVI
 
 /* ********************* callbacks for standard image buttons *************** */
 
-static char *slot_menu()
+static char *slot_menu(void)
 {
        char *str;
        int a, slot;
index be917f4..dab4869 100644 (file)
@@ -1628,16 +1628,16 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
        ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
        ImageSampleInfo *info= op->customdata;
        float fx, fy;
-       int x, y;
+       int mx, my;
        
        if(ibuf == NULL) {
                ED_space_image_release_buffer(sima, lock);
                return;
        }
 
-       x= event->x - ar->winrct.xmin;
-       y= event->y - ar->winrct.ymin;
-       UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy);
+       mx= event->x - ar->winrct.xmin;
+       my= event->y - ar->winrct.ymin;
+       UI_view2d_region_to_view(&ar->v2d, mx, my, &fx, &fy);
 
        if(fx>=0.0 && fy>=0.0 && fx<1.0 && fy<1.0) {
                float *fp;
index 6ffbf14..b4a63d3 100644 (file)
@@ -349,7 +349,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
        }
 
        if (rti->widthfac == 0.0) {
-               /* initialise colours based on report type */
+               /* initialise colors based on report type */
                if(report->type & RPT_ERROR_ALL) {
                        rti->col[0] = 1.0;
                        rti->col[1] = 0.2;
@@ -374,7 +374,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
        if(color_progress <= 1.0f) {
                send_note= 1;
                
-               /* fade colours out sharply according to progress through fade-out duration */
+               /* fade colors out sharply according to progress through fade-out duration */
                interp_v3_v3v3(rti->col, rti->col, neutral_col, color_progress);
                rti->greyscale = interpf(neutral_grey, rti->greyscale, color_progress);
        }
index 95c1614..ba417f0 100644 (file)
@@ -277,7 +277,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
        }
 }
 
-void recent_files_menu_register()
+void recent_files_menu_register(void)
 {
        MenuType *mt;
 
index 739b3b4..e6ed3f6 100644 (file)
@@ -2206,7 +2206,6 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                eoa= act->data;
 
                if(eoa->type==ACT_EDOB_ADD_OBJECT) {
-                       int wval; /* just a temp width */
                        ysize = 92;
                        glRects(xco, yco-ysize, xco+width, yco);
                        uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
index 98550b7..d5a007f 100644 (file)
@@ -171,7 +171,7 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
        }       
        else if (strip->type == NLASTRIP_TYPE_META) {
                /* Meta Clip */
-               // TODO: should temporary metas get different colours too?
+               // TODO: should temporary metas get different colors too?
                if (strip->flag & NLASTRIP_FLAG_SELECT) {
                        /* selected - use a bold purple color */
                        // FIXME: hardcoded temp-hack colors
@@ -272,7 +272,7 @@ static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
        }
        
        /* time -------------------------- */
-       // XXX do we want to draw this curve? in a different colour too?
+       // XXX do we want to draw this curve? in a different color too?
        
        /* turn off AA'd lines */
        glDisable(GL_LINE_SMOOTH);
@@ -431,7 +431,7 @@ static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNU
        else
                sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end);
        
-       /* set text colour - if colours (see above) are light, draw black text, otherwise draw white */
+       /* set text color - if colors (see above) are light, draw black text, otherwise draw white */
        if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER))
                glColor3f(0.0f, 0.0f, 0.0f);
        else
index 38a29a1..f9c5661 100644 (file)
@@ -340,7 +340,7 @@ static int treesort_alpha(const void *v1, const void *v2)
        if(comp==1) return 1;
        else if(comp==2) return -1;
        else if(comp==3) {
-               int comp= strcmp(x1->name, x2->name);
+               comp= strcmp(x1->name, x2->name);
                
                if( comp>0 ) return 1;
                else if( comp<0) return -1;
index 6b4ae40..49d7e6a 100644 (file)
@@ -513,7 +513,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
        if(seq->flag & SELECT){
                cpack(0xFFFFFF);
        }else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50){
-               cpack(0x505050); /* use lighter text colour for dark background */
+               cpack(0x505050); /* use lighter text color for dark background */
        }else{
                cpack(0);
        }
index 8b5580c..9cc9855 100644 (file)
@@ -923,12 +923,12 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
                        Sequence * (*cut_seq)(Scene *, Sequence *, int))
 {
        int did_something = FALSE;
-       Sequence *seq, *seq_next;
+       Sequence *seq, *seq_next_iter;
        
        seq= old->first;
        
        while(seq) {
-               seq_next = seq->next; /* we need this because we may remove seq */
+               seq_next_iter = seq->next; /* we need this because we may remove seq */
                
                seq->tmp= NULL;
                if(seq->flag & SELECT) {
@@ -947,7 +947,7 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
                                BLI_addtail(new, seq);
                        }
                }
-               seq = seq_next;
+               seq = seq_next_iter;
        }
        return did_something;
 }
@@ -1781,7 +1781,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
        Scene *scene= CTX_data_scene(C);
        Editing *ed= seq_give_editing(scene, FALSE);
        
-       Sequence *seq, *seq_new, *seq_next;
+       Sequence *seq, *seq_new, *seq_next_iter;
        Strip *strip_new;
        StripElem *se, *se_new;
        int start_ofs, cfra, frame_end;
@@ -1793,7 +1793,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
                if((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
                        /* remove seq so overlap tests dont conflict,
                        see seq_free_sequence below for the real free'ing */
-                       seq_next = seq->next;
+                       seq_next_iter = seq->next;
                        BLI_remlink(ed->seqbasep, seq);
                        /* if(seq->ipo) seq->ipo->id.us--; */
                        /* XXX, remove fcurve and assign to split image strips */
index 720aa09..a2eefe6 100644 (file)
@@ -363,16 +363,16 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
                {
                        SpaceSeq *sseq= CTX_wm_space_seq(C);
                        if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
-                               TimeMarker *marker;
+                               TimeMarker *tmarker;
 
-                               for (marker= scene->markers.first; marker; marker= marker->next) {
-                                       if(     ((x < CFRA) && marker->frame < CFRA) ||
-                                               ((x >= CFRA) && marker->frame >= CFRA)
+                               for (tmarker= scene->markers.first; tmarker; tmarker= tmarker->next) {
+                                       if(     ((x < CFRA) && tmarker->frame < CFRA) ||
+                                               ((x >= CFRA) && tmarker->frame >= CFRA)
                                        ) {
-                                               marker->flag |= SELECT;
+                                               tmarker->flag |= SELECT;
                                        }
                                        else {
-                                               marker->flag &= ~SELECT;
+                                               tmarker->flag &= ~SELECT;
                                        }
                                }
                        }
index 3b0d8bb..c5037d1 100644 (file)
@@ -1418,7 +1418,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
                        UI_ThemeColor(TH_SHADE2);
                        glRecti(x+16, y-3, x+16+w, y+st->lheight-3);
                }
-               b=1; /* b=1 colour block, text is default. b=0 no block, colour text */
+               b=1; /* b=1 color block, text is default. b=0 no block, color text */
                switch (item->type) {
                        case 'k': UI_ThemeColor(TH_SYNTAX_B); b=0; break;
                        case 'm': UI_ThemeColor(TH_TEXT); break;
@@ -1442,10 +1442,11 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
 {
        Text *text= st->text;
        int vcurl, vcurc, vsell, vselc, hidden=0;
-       int offl, offc, x, y, w, i;
+       int x, y, w, i;
 
        /* Draw the selection */
        if(text->curl!=text->sell || text->curc!=text->selc) {
+               int offl, offc;
                /* Convert all to view space character coordinates */
                wrap_offset(st, ar, text->curl, text->curc, &offl, &offc);
                vcurl = txt_get_span(text->lines.first, text->curl) - st->top + offl;
@@ -1489,6 +1490,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
                }
        }
        else {
+               int offl, offc;
                wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
                vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
                vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
index c229e68..3bfc1aa 100644 (file)
@@ -99,7 +99,7 @@ void text_free_caches(struct SpaceText *st);
 int text_file_modified(struct Text *text);
 
 int text_do_suggest_select(struct SpaceText *st, struct ARegion *ar);
-void text_pop_suggest_list();
+void text_pop_suggest_list(void);
 
 int text_get_visible_lines(struct SpaceText *st, struct ARegion *ar, char *str);
 int text_get_span_wrap(struct SpaceText *st, struct ARegion *ar, struct TextLine *from, struct TextLine *to);
index 720e80e..1c75e6f 100644 (file)
@@ -388,7 +388,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
                /* Find the next temporary marker */
                if(evnt==TABKEY) {
                        int lineno= txt_get_span(text->lines.first, text->curl);
-                       TextMarker *mrk= text->markers.first;
+                       mrk= text->markers.first;
                        while(mrk) {
                                if(!marker && (mrk->flags & TMARK_TEMP)) marker= mrk;
                                if((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) {
index e65751e..52a2cd2 100644 (file)
@@ -427,7 +427,7 @@ static void draw_bonevert_solid(void)
        glCallList(displist);
 }
 
-static void draw_bone_octahedral()
+static void draw_bone_octahedral(void)
 {
        static GLuint displist=0;
        
index 0fb7ff8..6737282 100644 (file)
@@ -383,7 +383,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
        glShadeModel(GL_SMOOTH);
 }
 
-static void draw_textured_end()
+static void draw_textured_end(void)
 {
        /* switch off textures */
        GPU_set_tpage(NULL, 0);
index a55e054..65b621b 100644 (file)
@@ -413,9 +413,6 @@ void drawaxes(float size, char drawtype)
        
        case OB_PLAINAXES:
                for (axis=0; axis<3; axis++) {
-                       float v1[3]= {0.0, 0.0, 0.0};
-                       float v2[3]= {0.0, 0.0, 0.0};
-                       
                        glBegin(GL_LINES);
                        
                        v1[axis]= size;
@@ -478,8 +475,6 @@ void drawaxes(float size, char drawtype)
        case OB_ARROWS:
        default:
                for (axis=0; axis<3; axis++) {
-                       float v1[3]= {0.0, 0.0, 0.0};
-                       float v2[3]= {0.0, 0.0, 0.0};
                        int arrow_axis= (axis==0)?1:0;
                        
                        glBegin(GL_LINES);
@@ -6278,10 +6273,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                if (list) {
                        bConstraint *curcon;
                        bConstraintOb *cob;
-                       char col[4], col2[4];
+                       char col1[4], col2[4];
                        
-                       UI_GetThemeColor3ubv(TH_GRID, col);
-                       UI_make_axis_color(col, col2, 'z');
+                       UI_GetThemeColor3ubv(TH_GRID, col1);
+                       UI_make_axis_color(col1, col2, 'z');
                        glColor3ubv((GLubyte *)col2);
                        
                        cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
index 96329ac..267fcb6 100644 (file)
@@ -824,7 +824,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
                                sprintf(info, "(%d) %s", CFRA, ob->id.name+2);
                }
                
-               /* colour depends on whether there is a keyframe */
+               /* color depends on whether there is a keyframe */
                if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/(float)(CFRA), v3d->keyflags))
                        UI_ThemeColor(TH_VERTEX_SELECT);
                else
@@ -837,7 +837,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
                else
                        sprintf(info, "(%d)", CFRA);
                
-               /* colour is always white */
+               /* color is always white */
                UI_ThemeColor(TH_TEXT_HI);
        }
        
@@ -2425,13 +2425,13 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
        }
 
        if(v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */
-               ARegion *ar;
+               ARegion *ar_iter;
                ScrArea *sa= CTX_wm_area(C);
 
                /* find header and force tag redraw */
-               for(ar= sa->regionbase.first; ar; ar= ar->next)
-                       if(ar->regiontype==RGN_TYPE_HEADER) {
-                               ED_region_tag_redraw(ar);
+               for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next)
+                       if(ar_iter->regiontype==RGN_TYPE_HEADER) {
+                               ED_region_tag_redraw(ar_iter);
                                break;
                        }
 
index 5a7616b..55675f8 100644 (file)
@@ -81,9 +81,6 @@
 #define TEST_EDITMESH  if(obedit==0) return; \
                                                if( (v3d->lay & obedit->lay)==0 ) return;
 
-/* XXX port over */    
-extern void borderselect();
-
 /* view3d handler codes */
 #define VIEW3D_HANDLER_BACKGROUND      1
 #define VIEW3D_HANDLER_PROPERTIES      2
index 2159aef..a3289c4 100644 (file)
@@ -365,11 +365,8 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, short mcords[][2],
                }
        }
        
-       {
-               bArmature *arm= ob->data;
-               if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) {
-                       arm->act_bone= NULL;
-               }
+       if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) {
+               arm->act_bone= NULL;
        }
 }
 
index 9f6054a..5bedcfd 100644 (file)
@@ -783,16 +783,16 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
                transvmain= NULL;
        }
        else {
-               Object *ob= CTX_data_active_object(C);
+               Object *obact= CTX_data_active_object(C);
                
-               if(ob && (ob->mode & OB_MODE_POSE)) {
-                       bArmature *arm= ob->data;
+               if(obact && (obact->mode & OB_MODE_POSE)) {
+                       bArmature *arm= obact->data;
                        bPoseChannel *pchan;
-                       for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
+                       for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) {
                                if(arm->layer & pchan->bone->layer) {
                                        if(pchan->bone->flag & BONE_SELECTED) {
                                                VECCOPY(vec, pchan->pose_head);
-                                               mul_m4_v3(ob->obmat, vec);
+                                               mul_m4_v3(obact->obmat, vec);
                                                add_v3_v3(centroid, vec);
                                                DO_MINMAX(vec, min, max);
                                                count++;
index ccadf97..c47d49d 100644 (file)
@@ -4542,7 +4542,7 @@ static int createSlideVerts(TransInfo *t)
                        sv = BLI_ghash_lookup(vertgh, ev);
 
                        if(sv) {
-                               float co[3], co2[3], vec[3];
+                               float co[3], co2[3], tvec[3];
 
                                ev = (EditVert*)look->link;
 
@@ -4559,12 +4559,12 @@ static int createSlideVerts(TransInfo *t)
                                }
 
                                if (ev == tempsv->up->v1) {
-                                       sub_v3_v3v3(vec, co, co2);
+                                       sub_v3_v3v3(tvec, co, co2);
                                } else {
-                                       sub_v3_v3v3(vec, co2, co);
+                                       sub_v3_v3v3(tvec, co2, co);
                                }
 
-                               add_v3_v3(start, vec);
+                               add_v3_v3(start, tvec);
 
                                if (v3d) {
                                        view3d_project_float(t->ar, tempsv->down->v1->co, co, projectMat);
@@ -4572,12 +4572,12 @@ static int createSlideVerts(TransInfo *t)
                                }
 
                                if (ev == tempsv->down->v1) {
-                                       sub_v3_v3v3(vec, co2, co);
+                                       sub_v3_v3v3(tvec, co2, co);
                                } else {
-                                       sub_v3_v3v3(vec, co, co2);
+                                       sub_v3_v3v3(tvec, co, co2);
                                }
 
-                               add_v3_v3(end, vec);
+                               add_v3_v3(end, tvec);
 
                                totvec += 1.0f;
                                nearest = (EditVert*)look->link;
@@ -5853,7 +5853,7 @@ void BIF_TransformSetUndo(char *UNUSED(str))
 }
 
 
-void NDofTransform()
+void NDofTransform(void)
 {
 #if 0 // TRANSFORM_FIX_ME
        float fval[7];
index 305a933..1f05f8b 100644 (file)
@@ -446,7 +446,7 @@ static short apply_targetless_ik(Object *ob)
 
                                /* apply and decompose, doesn't work for constraints or non-uniform scale well */
                                {
-                                       float rmat3[3][3], qrmat[3][3], imat[3][3], smat[3][3];
+                                       float rmat3[3][3], qrmat[3][3], imat3[3][3], smat[3][3];
                                        
                                        copy_m3_m4(rmat3, rmat);
                                        
@@ -473,8 +473,8 @@ static short apply_targetless_ik(Object *ob)
                                                else
                                                        quat_to_mat3( qrmat,parchan->quat);
                                                
-                                               invert_m3_m3(imat, qrmat);
-                                               mul_m3_m3m3(smat, rmat3, imat);
+                                               invert_m3_m3(imat3, qrmat);
+                                               mul_m3_m3m3(smat, rmat3, imat3);
                                                mat3_to_size( parchan->size,smat);
                                        }
                                        
@@ -5051,10 +5051,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
 
                for (i = 0; i < t->total; i++) {
                        TransData *td = t->data + i;
-                       Object *ob = td->ob;
                        ListBase pidlist;
                        PTCacheID *pid;
-                       
+                       ob = td->ob;
+
                        if (td->flag & TD_NOACTION)
                                break;
                        
index 9e37f28..21ec46d 100644 (file)
@@ -321,8 +321,7 @@ static int fcu_test_selected(FCurve *fcu)
 /* called for updating while transform acts, once per redraw */
 void recalcData(TransInfo *t)
 {
-       Scene *scene = t->scene;
-       Base *base = scene->basact;
+       Base *base = t->scene->basact;
 
        if (t->spacetype==SPACE_NODE) {
                flushTransNodes(t);
@@ -785,9 +784,9 @@ void recalcData(TransInfo *t)
                                DAG_id_flush_update(&ob->id, OB_RECALC_DATA);  /* sets recalc flags */
                        }
                        else
-                               where_is_pose(scene, ob);
+                               where_is_pose(t->scene, ob);
                }
-               else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(scene, base->object)) {
+               else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, base->object)) {
                        if(t->state != TRANS_CANCEL) {
                                applyProject(t);
                        }
index 25d19f1..ce8a484 100644 (file)
@@ -793,7 +793,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
        GLUquadricObj *qobj;
        double plane[4];
        float matt[4][4];
-       float size, vec[3], unitmat[4][4];
+       float size, unitmat[4][4];
        float cywid= 0.33f*0.01f*(float)U.tw_handlesize;
        float cusize= cywid*0.65f;
        int arcs= (G.rt!=2);
@@ -814,8 +814,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
        gluQuadricDrawStyle(qobj, GLU_FILL);
 
        /* prepare for screen aligned draw */
-       VECCOPY(vec, rv3d->twmat[0]);
-       size= normalize_v3(vec);
+       size= len_v3(rv3d->twmat[0]);
        glPushMatrix();
        glTranslatef(rv3d->twmat[3][0], rv3d->twmat[3][1], rv3d->twmat[3][2]);
 
index dcfad45..de6c562 100644 (file)
@@ -316,28 +316,24 @@ void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) {
 
 void BIF_removeTransformOrientationIndex(bContext *C, int index) {
        ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
-       TransformOrientation *ts = transform_spaces->first;
-       int i;
-       
-       for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
-               if (i == index) {
-                       View3D *v3d = CTX_wm_view3d(C);
-                       if(v3d) {
-                               int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
-                               
-                               // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
-                               if (selected_index == i) {
-                                       v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global   */
-                               }
-                               else if (selected_index > i) {
-                                       v3d->twmode--;
-                               }
-                               
-                       }
+       TransformOrientation *ts= BLI_findlink(transform_spaces, index);
 
-                       BLI_freelinkN(transform_spaces, ts);
-                       break;
+       if (ts) {
+               View3D *v3d = CTX_wm_view3d(C);
+               if(v3d) {
+                       int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+                       
+                       // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
+                       if (selected_index == index) {
+                               v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global   */
+                       }
+                       else if (selected_index > index) {
+                               v3d->twmode--;
+                       }
+                       
                }
+
+               BLI_freelinkN(transform_spaces, ts);
        }
 }
 
@@ -809,14 +805,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                                {
                                        if (ebone->flag & BONE_SELECTED)
                                        {
-                                               float mat[3][3];
+                                               float tmat[3][3];
                                                float vec[3];
                                                sub_v3_v3v3(vec, ebone->tail, ebone->head);
                                                normalize_v3(vec);
                                                add_v3_v3(normal, vec);
                                                
-                                               vec_roll_to_mat3(vec, ebone->roll, mat);
-                                               add_v3_v3(plane, mat[2]);
+                                               vec_roll_to_mat3(vec, ebone->roll, tmat);
+                                               add_v3_v3(plane, tmat[2]);
                                        }
                                }
                        }
index 6128c62..f2beb5b 100644 (file)
@@ -706,7 +706,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
                        ListBase depth_peels;
                        DepthPeel *p1, *p2;
                        float *last_p = NULL;
-                       float dist = FLT_MAX;
+                       float max_dist = FLT_MAX;
                        float p[3] = {0.0f, 0.0f, 0.0f};
                        
                        depth_peels.first = depth_peels.last = NULL;
@@ -770,21 +770,21 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
                                        if (last_p == NULL)
                                        {
                                                VECCOPY(p, vec);
-                                               dist = 0;
+                                               max_dist = 0;
                                                break;
                                        }
                                        
                                        new_dist = len_v3v3(last_p, vec);
                                        
-                                       if (new_dist < dist)
+                                       if (new_dist < max_dist)
                                        {
                                                VECCOPY(p, vec);
-                                               dist = new_dist;
+                                               max_dist = new_dist;
                                        }
                                }
                        }
                        
-                       if (dist != FLT_MAX)
+                       if (max_dist != FLT_MAX)
                        {
                                VECCOPY(loc, p);
                                /* XXX, is there a correct normal in this case ???, for now just z up */
@@ -1814,25 +1814,25 @@ int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase
                                
                                for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
                                {
-                                       Object *ob = dupli_ob->ob;
+                                       Object *dob = dupli_ob->ob;
                                        
-                                       if (ob->type == OB_MESH) {
+                                       if (dob->type == OB_MESH) {
                                                EditMesh *em;
                                                DerivedMesh *dm = NULL;
                                                int val;
 
-                                               if (ob != obedit)
+                                               if (dob != obedit)
                                                {
-                                                       dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
+                                                       dm = mesh_get_derived_final(scene, dob, CD_MASK_BAREMESH);
                                                        
-                                                       val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+                                                       val = peelDerivedMesh(dob, dm, dob->obmat, ray_start, ray_normal, mval, depth_peels);
                                                }
                                                else
                                                {
-                                                       em = ((Mesh *)ob->data)->edit_mesh;
+                                                       em = ((Mesh *)dob->data)->edit_mesh;
                                                        dm = editmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH);
                                                        
-                                                       val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+                                                       val = peelDerivedMesh(dob, dm, dob->obmat, ray_start, ray_normal, mval, depth_peels);
                                                }
 
                                                retval = retval || val;
index 0fa54c6..147ea43 100644 (file)
@@ -26,7 +26,7 @@ typedef enum ParamBool {
    - output will be written to the uv pointers
 */
 
-ParamHandle *param_construct_begin();
+ParamHandle *param_construct_begin(void);
 
 void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy);
 
index e5e46d4..f4a6d6e 100644 (file)
@@ -143,8 +143,8 @@ ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit,
                efa = EM_get_actFace(em, 1);
 
                if(efa) {
-                       MTFace *tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
                        float aspx, aspy;
+                       tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
 
                        ED_image_uv_aspect(tf->tpage, &aspx, &aspy);
                
index 6f552e0..342cc6b 100644 (file)
@@ -121,7 +121,7 @@ typedef struct GPUAttrib
        int type;
 } GPUAttrib;
 
-GPUBufferPool *GPU_buffer_pool_new();
+GPUBufferPool *GPU_buffer_pool_new(void);
 void GPU_buffer_pool_free( GPUBufferPool *pool );
 void GPU_buffer_pool_free_unused( GPUBufferPool *pool );
 
@@ -171,7 +171,7 @@ void GPU_color_switch( int mode );
 void GPU_buffer_draw_elements( GPUBuffer *elements, unsigned int mode, int start, int count );
 
 /* called after drawing */
-void GPU_buffer_unbind();
+void GPU_buffer_unbind(void);
 
 int GPU_buffer_legacy( struct DerivedMesh *dm );
 
index 96c6877..14d951f 100644 (file)
@@ -130,14 +130,14 @@ int GPU_texture_opengl_height(GPUTexture *tex);
    - after any of the GPU_framebuffer_* functions, GPU_framebuffer_restore must
         be called before rendering to the window framebuffer again */
 
-GPUFrameBuffer *GPU_framebuffer_create();
+GPUFrameBuffer *GPU_framebuffer_create(void);
 int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex);
 void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex);
 void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex);
 void GPU_framebuffer_texture_unbind(GPUFrameBuffer *fb, GPUTexture *tex);
 void GPU_framebuffer_free(GPUFrameBuffer *fb);
 
-void GPU_framebuffer_restore();
+void GPU_framebuffer_restore(void);
 
 /* GPU OffScreen
    - wrapper around framebuffer and texture for simple offscreen drawing 
@@ -157,7 +157,7 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const
 void GPU_shader_free(GPUShader *shader);
 
 void GPU_shader_bind(GPUShader *shader);
-void GPU_shader_unbind();
+void GPU_shader_unbind(GPUShader *shader);
 
 int GPU_shader_get_uniform(GPUShader *shader, char *name);
 void GPU_shader_uniform_vector(GPUShader *shader, int location, int length,
index e0602c2..23f13bc 100644 (file)
@@ -122,7 +122,7 @@ GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4]);
 GPUMaterial *GPU_material_from_blender(struct Scene *scene, struct Material *ma);
 void GPU_material_free(struct Material *ma);
 
-void GPU_materials_free();
+void GPU_materials_free(void);
 
 void GPU_material_bind(GPUMaterial *material, int oblay, int viewlay, double time, int mipmap);
 void GPU_material_bind_uniforms(GPUMaterial *material, float obmat[][4], float viewmat[][4], float viewinv[][4], float obcol[4]);
index a3a4205..e54002a 100644 (file)
@@ -307,7 +307,7 @@ static void gpu_make_repbind(Image *ima)
                ima->repbind= MEM_callocN(sizeof(int)*ima->totbind, "repbind");
 }
 
-static void gpu_clear_tpage()
+static void gpu_clear_tpage(void)
 {
        if(GTS.lasttface==0)
                return;
index d147dd2..70cc643 100644 (file)
@@ -1070,7 +1070,7 @@ void GPU_shader_bind(GPUShader *shader)
        GPU_print_error("Post Shader Bind");
 }
 
-void GPU_shader_unbind()
+void GPU_shader_unbind(GPUShader *UNUSED(shader))
 {
        GPU_print_error("Pre Shader Unbind");
        glUseProgramObjectARB(0);
index d7aa7c3..3275461 100644 (file)
@@ -1294,7 +1294,7 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma)
        return mat;
 }
 
-void GPU_materials_free()
+void GPU_materials_free(void)
 {
        Object *ob;
        Material *ma;
index 9248b76..cae6eda 100644 (file)
@@ -69,7 +69,7 @@ void IMB_thumb_delete(const char* path, ThumbSize size);
 ImBuf* IMB_thumb_manage(const char* path, ThumbSize size, ThumbSource source);
 
 /* create the necessary dirs to store the thumbnails */
-void IMB_thumb_makedirs();
+void IMB_thumb_makedirs(void);
 
 /* special function for loading a thumbnail embedded into a blend file */
 ImBuf *IMB_loadblend_thumb(const char *path);
index 53828ed..17387c0 100644 (file)
@@ -443,7 +443,7 @@ static void imbuf_cache_destructor(void *data)
        ibuf->c_handle = 0;
 }
 
-static MEM_CacheLimiterC **get_imbuf_cache_limiter()
+static MEM_CacheLimiterC **get_imbuf_cache_limiter(void)
 {
        static MEM_CacheLimiterC *c = 0;
 
index e86a4a5..bfc413d 100644 (file)
@@ -422,7 +422,7 @@ typedef enum eItasc_Solver {
  * ensure that action-groups never end up being the sole 'owner' of a channel.
  * 
  * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used 
- * primarily to colour bones in the 3d-view. There are other benefits too, but those are mostly related
+ * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related
  * to Action-Groups.
  */
 typedef struct bActionGroup {
@@ -595,7 +595,7 @@ typedef enum eSAction_Flag {
        //SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick
                /* hack for moving pose-markers (temp flag)  */
        SACTION_POSEMARKERS_MOVE = (1<<6),
-               /* don't draw action channels using group colours (where applicable) */
+               /* don't draw action channels using group colors (where applicable) */
        SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation
                /* don't draw current frame number beside frame indicator */
        SACTION_NODRAWCFRANUM = (1<<8),
index a9f6beb..effa5e3 100644 (file)
@@ -116,7 +116,7 @@ typedef enum eArmature_Flag {
        ARM_MIRROR_EDIT         = (1<<8),
        ARM_AUTO_IK                     = (1<<9),
        ARM_NO_CUSTOM           = (1<<10),      /* made option negative, for backwards compat */
-       ARM_COL_CUSTOM          = (1<<11),      /* draw custom colours  */
+       ARM_COL_CUSTOM          = (1<<11),      /* draw custom colors  */
        ARM_GHOST_ONLYSEL       = (1<<12),      /* when ghosting, only show selected bones (this should belong to ghostflag instead) */ // XXX depreceated
        ARM_DS_EXPAND           = (1<<13)
 } eArmature_Flag;
index 3ec9d9f..ea079d9 100644 (file)
@@ -1121,7 +1121,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
        prop= RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
        RNA_def_property_float_sdna(prop, NULL, "reflection_col");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Reflection Color", "Colour of light scattered out of the volume (does not affect transmission)");
+       RNA_def_property_ui_text(prop, "Reflection Color", "Color of light scattered out of the volume (does not affect transmission)");
        RNA_def_property_update(prop, 0, "rna_Material_draw_update");
        
        prop= RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
index 14ba0c3..309800e 100644 (file)
@@ -91,13 +91,13 @@ static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
 {
        bActionGroup *grp= ptr->data;
        
-       /* if valid value, set the new enum value, then copy the relevant colours? */
+       /* if valid value, set the new enum value, then copy the relevant colors? */
        if ((value >= -1) && (value < 21))
                grp->customCol= value;
        else
                return;
        
-       /* only do color copying if using a custom color (i.e. not default colour)  */
+       /* only do color copying if using a custom color (i.e. not default color)  */
        if (grp->customCol) {
                if (grp->customCol > 0) {
                        /* copy theme colors on-to group's custom color in case user tries to edit color */
index 0d2421e..520a6e6 100644 (file)
@@ -1656,7 +1656,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
        prop= RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR);
        RNA_def_property_float_sdna(prop, NULL, "framing.col");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Framing Color", "Set colour of the bars");
+       RNA_def_property_ui_text(prop, "Framing Color", "Set color of the bars");
        RNA_def_property_update(prop, NC_SCENE, NULL);
        
        /* Stereo */
index 4f085c8..38f2cd1 100644 (file)
 /*
        HOW TEXTURE NODES WORK
 
-       In contrast to Shader nodes, which place a colour into the output
+       In contrast to Shader nodes, which place a color into the output
        stack when executed, Texture nodes place a TexDelegate* there. To
-       obtain a colour value from this, a node further up the chain reads
+       obtain a color value from this, a node further up the chain reads
        the TexDelegate* from its input stack, and uses tex_call_delegate to
-       retrieve the colour from the delegate.
+       retrieve the color from the delegate.
  
        comments: (ton)
     
index b12ca47..ea36870 100644 (file)
@@ -174,7 +174,7 @@ static void setRndSeed(int seed)
 }
 
 /* float number in range [0, 1) using the mersenne twister rng */
-static float frand()
+static float frand(void)
 {
        unsigned long y;
 
index ee124e2..abf329b 100644 (file)
  */
 
 /* python, will come back */
-//void BPY_run_python_script() {}
-//void BPY_start_python() {}
+//void BPY_run_python_script(void) {}
+//void BPY_start_python(void) {}
 void BPY_call_importloader(const char *filepath) {(void)filepath;}
-//void BPY_free_compiled_text() {}
-void BPY_pyconstraint_eval() {}
-void BPY_pyconstraint_target() {}
-int BPY_is_pyconstraint() {return 0;}
-void BPY_pyconstraint_update() {}
+//void BPY_free_compiled_text(void) {}
+void BPY_pyconstraint_eval(void) {}
+void BPY_pyconstraint_target(void) {}
+int BPY_is_pyconstraint(void) {return 0;}
+void BPY_pyconstraint_update(void) {}
index 215dd81..2bbcfc0 100644 (file)
@@ -83,7 +83,7 @@ void RE_rayobject_hint_bb(RayObject *r, RayHint *hint, float *min, float *max);
 /* RayObject constructors */
 RayObject* RE_rayobject_octree_create(int ocres, int size);
 RayObject* RE_rayobject_instance_create(RayObject *target, float transform[][4], void *ob, void *target_ob);
-RayObject* RE_rayobject_empty_create();
+RayObject* RE_rayobject_empty_create(void);
 
 RayObject* RE_rayobject_blibvh_create(int size);       /* BLI_kdopbvh.c   */
 RayObject* RE_rayobject_vbvh_create(int size);         /* raytrace/rayobject_vbvh.c */
index 1b09526..fb9b398 100644 (file)
@@ -330,7 +330,7 @@ void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
 
 
 /* A combination of scattering and absorption -> known as sigma T.
- * This can possibly use a specific scattering colour, 
+ * This can possibly use a specific scattering color, 
  * and absorption multiplier factor too, but these parameters are left out for simplicity.
  * It's easy enough to get a good wide range of results with just these two parameters. */
 void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
@@ -571,8 +571,8 @@ outgoing radiance from behind surface * beam transmittance/attenuation
 /* For ease of use, I've also introduced a 'reflection' and 'reflection color' parameter, which isn't 
  * physically correct. This works as an RGB tint/gain on out-scattered light, but doesn't affect the light 
  * that is transmitted through the volume. While having wavelength dependent absorption/scattering is more correct,
- * it also makes it harder to control the overall look of the volume since colouring the outscattered light results
- * in the inverse colour being transmitted through the rest of the volume.
+ * it also makes it harder to control the overall look of the volume since coloring the outscattered light results
+ * in the inverse color being transmitted through the rest of the volume.
  */
 static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float *endco)
 {
index 3c86d0d..9014525 100644 (file)
@@ -56,8 +56,8 @@ typedef struct wmJob wmJob;
 
 /* general API */
 void           WM_setprefsize          (int stax, int stay, int sizx, int sizy);
-void           WM_setinitialstate_fullscreen();
-void           WM_setinitialstate_normal();
+void           WM_setinitialstate_fullscreen(void);
+void           WM_setinitialstate_normal(void);
 
 void           WM_init                         (struct bContext *C, int argc, char **argv);
 void           WM_exit                         (struct bContext *C);
index 3946738..18aa469 100644 (file)
@@ -79,13 +79,13 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar)
                if(screen->subwinactive == ar->swinid) {
                        for(pc= wm->paintcursors.first; pc; pc= pc->next) {
                                if(pc->poll == NULL || pc->poll(C)) {
-                                       ARegion *ar= CTX_wm_region(C);
+                                       ARegion *ar_other= CTX_wm_region(C);
                                        if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) {
                                                int x = 0, y = 0;
                                                wm_get_cursor_position(win, &x, &y);
-                                               pc->draw(C, x - ar->winrct.xmin, y - ar->winrct.ymin, pc->customdata);
+                                               pc->draw(C, x - ar_other->winrct.xmin, y - ar_other->winrct.ymin, pc->customdata);
                                        } else {
-                                               pc->draw(C, win->eventstate->x - ar->winrct.xmin, win->eventstate->y - ar->winrct.ymin, pc->customdata);
+                                               pc->draw(C, win->eventstate->x - ar_other->winrct.xmin, win->eventstate->y - ar_other->winrct.ymin, pc->customdata);
                                        }
                                }
                        }
index 6aec865..8be7cc2 100644 (file)
@@ -250,8 +250,6 @@ void wm_event_do_notifiers(bContext *C)
        
        /* the notifiers are sent without context, to keep it clean */
        while( (note=wm_notifier_next(wm)) ) {
-               wmWindow *win;
-               
                for(win= wm->windows.first; win; win= win->next) {
                        
                        /* filter out notifiers */
@@ -1805,11 +1803,11 @@ void wm_event_do_handlers(bContext *C)
                
                /* only add mousemove when queue was read entirely */
                if(win->addmousemove && win->eventstate) {
-                       wmEvent event= *(win->eventstate);
-                       event.type= MOUSEMOVE;
-                       event.prevx= event.x;
-                       event.prevy= event.y;
-                       wm_event_add(win, &event);
+                       wmEvent tevent= *(win->eventstate);
+                       tevent.type= MOUSEMOVE;
+                       tevent.prevx= tevent.x;
+                       tevent.prevy= tevent.y;
+                       wm_event_add(win, &tevent);
                        win->addmousemove= 0;
                }
                
index f75a1c0..d1fe841 100644 (file)
@@ -325,10 +325,10 @@ extern wchar_t *copybuf;
 extern wchar_t *copybufinfo;
 
        // XXX copy/paste buffer stuff...
-extern void free_anim_copybuf(); 
-extern void free_anim_drivers_copybuf(); 
-extern void free_fmodifiers_copybuf(); 
-extern void free_posebuf(); 
+extern void free_anim_copybuf(void); 
+extern void free_anim_drivers_copybuf(void); 
+extern void free_fmodifiers_copybuf(void); 
+extern void free_posebuf(void); 
 
 /* called in creator.c even... tsk, split this! */
 void WM_exit(bContext *C)
index 6a0b043..e9e2f70 100644 (file)
@@ -669,10 +669,10 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons
                PointerRNA ptr;
 
                EnumPropertyItem *item, *item_array;
-               int free;
+               int do_free;
 
                RNA_pointer_create(NULL, ot->srna, NULL, &ptr);
-               RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &free);
+               RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &do_free);
 
                for(item= item_array; item->identifier; item++) {
                        /* note: need to give the intex rather then the dientifier because the enum can be freed */
@@ -681,7 +681,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons
                                        break;
                }
 
-               if(free)
+               if(do_free)
                        MEM_freeN(item_array);
        }
 }
@@ -2369,18 +2369,18 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event)
                        rect->ymax= event->y - sy;
                        
                        if((val= wm_gesture_evaluate(gesture))) {
-                               wmEvent event;
+                               wmEvent tevent;
 
-                               event= *(window->eventstate);
+                               tevent= *(window->eventstate);
                                if(gesture->event_type==LEFTMOUSE)
-                                       event.type= EVT_TWEAK_L;
+                                       tevent.type= EVT_TWEAK_L;
                                else if(gesture->event_type==RIGHTMOUSE)
-                                       event.type= EVT_TWEAK_R;
+                                       tevent.type= EVT_TWEAK_R;
                                else
-                                       event.type= EVT_TWEAK_M;
-                               event.val= val;
+                                       tevent.type= EVT_TWEAK_M;
+                               tevent.val= val;
                                /* mouse coords! */
-                               wm_event_add(window, &event);
+                               wm_event_add(window, &tevent);
                                
                                WM_gesture_end(C, gesture);     /* frees gesture itself, and unregisters from window */
                        }
@@ -3425,7 +3425,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
 }
 
 /* Generic itemf's for operators that take library args */
-static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *free, ID *id, int local)
+static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *do_free, ID *id, int local)
 {
        EnumPropertyItem item_tmp= {0}, *item= NULL;
        int totitem= 0;
@@ -3440,44 +3440,44 @@ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(pt
        }
 
        RNA_enum_item_end(&item, &totitem);
-       *free= 1;
+       *do_free= 1;
 
        return item;
 }
 
 /* can add more as needed */
-EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE);
 }
-EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE);
 }
 
-EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE);
 }
-EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE);
 }
 
-EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE);
 }
-EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE);
 }
 
-EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE);
 }
-EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
 {
-       return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE);
+       return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE);
 }
index b608be4..3e03a33 100644 (file)
@@ -301,7 +301,6 @@ PyAttributeDef KX_LightObject::Attributes[] = {
        KX_PYATTRIBUTE_FLOAT_RW("energy", 0, 10, KX_LightObject, m_lightobj.m_energy),
        KX_PYATTRIBUTE_FLOAT_RW("distance", 0.01, 5000, KX_LightObject, m_lightobj.m_distance),
        KX_PYATTRIBUTE_RW_FUNCTION("color", KX_LightObject, pyattr_get_color, pyattr_set_color),
-       KX_PYATTRIBUTE_RW_FUNCTION("colour", KX_LightObject, pyattr_get_color, pyattr_set_color),
        KX_PYATTRIBUTE_FLOAT_RW("lin_attenuation", 0, 1, KX_LightObject, m_lightobj.m_att1),
        KX_PYATTRIBUTE_FLOAT_RW("quad_attenuation", 0, 1, KX_LightObject, m_lightobj.m_att2),
        KX_PYATTRIBUTE_FLOAT_RW("spotsize", 1, 180, KX_LightObject, m_lightobj.m_spotsize),
index 820e4a4..78728d2 100644 (file)
@@ -75,7 +75,7 @@ protected:
                        VT_A(val) = 0;
                // condition for fully opaque color
                else if (m_squareLimits[1] <= dist)
-                       // return normal colour
+                       // return normal color
                        VT_A(val) = 0xFF;
                // otherwise calc alpha
                else
index 7580563..fafb19f 100644 (file)
@@ -64,7 +64,7 @@ ImageRender::ImageRender (KX_Scene * scene, KX_Camera * camera) :
     m_mirror(NULL),
        m_clip(100.f)
 {
-       // initialize background colour
+       // initialize background color
        setBackground(0, 0, 255, 255);
     // retrieve rendering objects
     m_engine = KX_GetActiveEngine();
index d49544c..7861a2d 100644 (file)
@@ -85,7 +85,7 @@ protected:
     /// engine
     KX_KetsjiEngine* m_engine;
 
-       /// background colour
+       /// background color
        float  m_background[4];