- 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 4f25199e67f9fd94662fab68cdfbb1d8bf83499c..d555eb6a4a81d4a3bf3e12ab817c50e7b7b37369 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 8fbef8a07841cf0f25b7468482c358a3d112ad23..e421b9600aa5bcf0e951ffd97de3c14498d3a99d 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 f23d4a6390bb4c7142df1429e74a87c0a4015250..57bf6aba619545c3211ab78ebbdb0c881d800073 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 a24537fa3c1763fac745e2ed19b057a2ee4e112a..fab249cb2884a13d795446d978a961d8c25dbb3c 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 505deaf409baa4c6bb188aef4cbfea2c5159ce4d..6a4a6ac8c9d5107a2a0dc189c5bfe8aed985b3f0 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 a857f2925a2e585433dc552db8f21acb54a14880..d2f54230a2041630ce725ce65a4e35f2121dcb16 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 268cb36d9c7ddb87f1cb61b60c1b626d3c046512..07ff30763c0f715e3459499ffc5eca55b07f1a7b 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 9ea5db29aafe9b3fd0ea2a907caa62234104983f..5875538f95ad7e0399c893e185d63117695e0d8a 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 65c2a1a2585d99ce07f826c8a3a0f3ca392637d3..080e8f013acc24421af37d3ba00104e10bc822a0 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 2913d888eaf75089306bd4b0324bd5c95852a48e..76a06095f649d93c396b684256bb05de2dfe8aef 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 3cb7bed3dda03ad940065908a7f3384c201336f3..bee6a071e5d2047276932de30e5b0c70b5f850b1 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 08f2845de4f57544f5ed76da88a6e041006b3064..71b5ca82430e41007d543be2b7173f27f005864c 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 0b80b3a9ae1d945ea36cb7674b45aef6b7d43f3e..6f18bdbe2d1becc82d6860bda8e906fd6f8e5791 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 /**
  * Initalizes the Python module.
  */
-extern PyObject* AUD_initPython();
+extern PyObject* AUD_initPython(void);
 
 #ifdef __cplusplus
 }
index c38a4e2de88cbea0b45ea178fc123d97211b6c72..60b05f55b901e9604b4b794a12b157b6e77226be 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 20b69611bfb307600e24166613ad6b2e8c4b5003..3770bbde425a707259604c42e72414d1a5c0ba88 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 20912385f3b970140e6b7610dcb2ce78fb5c787d..d1e88748de4d006ffb1afe88ec2d1e674de0fdad 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 898625a95635922408d2965652585daf49743f70..0e53a0b0e0d307931cad643c42feb1105cd6a061 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 9960511eff999bf989767cc82cc686ea315315f9..46a22650f4b57c9d1952d8081a72fb251f109f2e 100644 (file)
@@ -24,6 +24,9 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
+# External project, better not fix warnings.
+REMOVE_STRICT_FLAGS()
+
 SET(INC
        extern
        superlu
index be76aa95eac52e71df0d106f2183cf0dabe7ae9d..c87cb7ef1466a60fde908babb7b81a7fbbe8e5b6 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 1a3526d4e7e29486d612f4cd493c29f049a382ad..953242d606d439db8867651ee56167adf98124ed 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 252191803f297acad7b432cbf71bfb4bfdf74d90..42cbd22d9f1be0982531661b339b8bfd7cc66b19 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 1a9fb2d7404337a641ffc3707e8b83dc65170bd1..e3b6ebd1ff8f4d6f3e15e8e64f58eca03250c1bc 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 c46604f09f01ff588609957e28dd1c9278d8504e..a59464bb7bac6e6124563d8050aaea6ae0108633 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 fb1a3c430067332888f6fe3f2f52111dc27a99be..2d4ea812f5746a787630d10425c55241352c8981 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 59369d6ac14ac929f5cfe4831879c7e280ac708c..9eb8897e0e0462ac86c5921e3e81e850cf0659a9 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 b781b18862cbe055fbcddd81fa4cc685ba3669ea..2469f7f7dbeba3591d0915b7b7dfc0243a4eacf9 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 c1a6200bf6071ac7924fa354e43624ddd71037b1..f92f2326aeb7c7892ba107bbf6d9dff2832add25 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 5ef41d17d63682a11683f31946cd79756aa427ba..1ed8241325e5d519ef407f998c34c7c574a3f9da 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 78306705d6bcde87bebab49ab99dab9bbac28aa0..30e4318e25631efc645176ccc4e80cc34d0bbec0 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 bdf71a8c6f04568576aa897dbdb1a82dd2584bdb..3d6710b186d6409c68a269ce1a4031ff5862d412 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 8096f0277bb889937f5b6f1892480f8bd3a4c528..ac61acac56aee35a4a7d3689d41bd5b1cb893304 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 2efef52ed3e465b3307c14acd7775b40d7ab7186..c11b51b9dd440bc27b5caa8516ed80904c3b6f4c 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 978b3c9864f23eee4bbcfb73b7a58799f4b1d100..ceee544d1b809f02781fec88f80cfe131f6435a4 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 1b720c1adaa43c17cc6426d23ba1eae1c1ec2820..7d39203cefc0e4a548390d96bb8c269238ac3f12 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 bdb8d11945c97ca61a491567ea5a33fd208b8da3..b78525d4f4e60ad291bb3042243d8f35874d7146 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 bbc441f3622b765a2c32da42e370e9d896cbe417..3bdfd6c6b74835e7518e386c5ea63c8c3c3487ea 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 0e985184f7ad3e9bbd073361f9accb7ad499a5bf..122385ca79a97c93ca1ca09c31b6dbf4973fd414 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 6a0a711404cc0d3504700dd727b40d3361177a43..ad968deb0c5cc7d336970fa3808af82508f4d1e6 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 c481744156a155dbf2246bc4d94daa64af2fa9e6..09a419b0e047e94dfce76e9db0a3d064a74b7f44 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 7144a7dce34bcceb17e20440c45c1d4ab10486f2..70d9d080c3114cf9b80a8f7928f4b61176c9fa8b 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 4bc2654e581b4421403ab51eef70a4af2eb54c9d..13cbfeec2bbbfd93c66e303f8a88b268fd34f6bc 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 5d96c015caa9551f53d1b7eac3c76ba7b1a34b30..9c801d97ba8af66ee47f23d8f9c58572528ab111 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 2f6bccff4044dcc9175f60f0e8acc2e87682b8bb..9260a3a99531a30950e7d09a73836dfea6d6c0b2 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 5ef13bcdc1b68f2df6e098771b087f6c6cdf260d..d043c2e472d4d99f5e0c673530038bf034a3fcd8 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 f193defc129bc35f1d92b381d038cb20300286da..e93775f593b8d0404fe340f02d982092b7ad8e21 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 d1430808fcadd6a980f230702a9c6babd701f8f8..2ec940d25bcb9451d8e7db72e51051b8bfabc13b 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 6b12bafc187172f6388b96717311f72b13ee3496..db2e8eb276aa75b18b77c7f6f0e12c4ce6598ba2 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 3bebc4232352bbed02ceec45c5898bfaa3d90165..39f83407d74fc26a8e34d82b0f87adbe3c3082b8 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 a2441a825396e52f696621fe79648dbc5e3fa78f..5a328d4f26d6f3ca2d2e6ae6e61deda587a7b770 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 8f37baf9af1424dd25937bf8e5776d63670d6dd5..3fa07da0437ad24678f3d4ea31f3392c3626507a 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 b698cd610a2d91e6f087f48ed18934d65fea436b..34a390b250e8e216a577c0e263dca401a3b7ea6b 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 0f298f5cbef81e0e925590b29ba2cb224249ef2a..be54e6a2febd1815498411ca691a53a9da298a76 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 22f1771923bf6a9b8a2978b01f1c7cd99cf3728f..8724b7fad28c0c8ae16460eaea0108923aec1416 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 e39e594af667f3e572580148b708777287107834..8533e5ba893a389331d566b8b0dfd1f2e46e8028 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 4e669746c2fc33b83b8091c5ef36571b0eab2721..4c166251268c43a69357d55262bee5274817276f 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 0747d772cdfa626cf4aa96f50e307b6ec62471c9..6b834c08456bb7cfebd1147aa2b7e6203dd0fa62 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 75daa7633a45d268bfab12e70f3df32c4064908f..ae75bd03d86fbbd43c1f786932d7bb9f7c28f6fa 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 2a6ab525f89557846d71469d7c7b704c55d38ad0..403c7001b3b25564de8f82eff86ad445fbce15ef 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 b6fa0916443308eaec87891d9fae37eb3a32984b..2bc72d717c0a2caf8bcc89e1d0a7790819f5878b 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 6be2a018b71873df0b45764d042682b066899df2..af63b9cf37eb2f97557d0bdf2874563327460c75 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 424b3c5467fa6199910abd3bfa183ecbd86a0efd..99b3d4e64ab91b0f3fb252cca8cf4f1589802d77 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 2e095af9c03efea02ee57b4ba7f5ea80f7f4ebe8..70fcca097ef9fbe430a1627be90e94e268748c6d 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 c9934275f3fd088d87eb52cd50c4d55fbc5c5004..af03df34d5c28ecefc8e1a23b86d0c5da90609eb 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 2a04859f462c5bd076854aee06dabb17562bb323..8adf504b7fdc65fc18314b0efccb723e5c347133 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 b7c4011c53813b5c8c12b774f4661d2508537a25..820e287e945395461ef57ffc25bc07dab3cae76d 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <stddef.h>
 #include <stdlib.h>
-#include <string.h>
 #include <math.h>
 #include <float.h>
 
index d9e0140c69953e48a03d7beaf2d34453839dc9e8..a077e9890b0f42b9d834ab327d2ab2fdc56374df 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 5c68917a83a7c0e6bab553bf6ece9037f73a2b2b..22d1a2f6b9de2142d711202fc05563e84326a344 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 b131a358ae75e429146c5853331a29e2077575c8..deda2ce0129472d8c58dcc965b826b3518ea4f52 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 12370e5b1ac6324ccd208e94f483bd5d540c68cf..cba64fe6325f6902f47e146d10b2b578fa777172 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 824ff8b154d6aa4e944048abf70a131141488f38..5697154998ba4fa1ad306e3c46464f06b8b67f18 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 16bdaae2bf59af3e7c431c44343674776752ab25..41aace4e0a76075283eb9d071ae2a40419c75484 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 a6c4c77e468ad34c0ffdefffcfbaebca67492889..6a9fc1489f141dbbdad6f0434e8ff221732b8b74 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 bd4bae23c7d14e67565082c295395c807737e82f..68a73e77a383e6b9f81a8dd9c125f9c8a31c6e4f 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 ac563621f30e3a00a881ddb2fe6f90e6c2da0977..89f441999148608d6dcf2b584152f44c751f7883 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 73ca3bad5c2e30e16c1d155b89d6aa13e15704a1..d15dd7902bf151a380723317b5f81f247435cdf5 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 ce9a96af38c0886fb16cf3a9c6c05c7b2623ce36..c1a5453abfe8fb003f980339abb64f29a572559b 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 f26bc63f01d5af4ecd55a1e31fee1545bbad9b0b..d4d1429530cf8b038f6553b4a209b65c5c127cec 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 e8c7cc6c92631b78d42ddcf2e733847d8d66694f..405c965ecceb925fc6e6f73df43799aecfba3d7f 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 fc7ab289683a1245918adef83909df33de03bed7..692953a18a34d523822e8c1753ef20c12e6a4063 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 9dd7ab26625f25d4ec17997c4213ba025314c002..eb1c46d652eb8b7bbd5ef9f1d029be9a24eb544a 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 dd3672b656a520678d9b6bcd859b0ae7df71b395..4d180d90992a11560ce995119c38cef5726f9626 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 1f92f32cc889f3be32a3167c6dc171dfee41428e..d875aaafd33fe7391fc56bbd0455107b39aca0d4 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 cac56d7683162f862458a15a68a33cb96fc07762..970be9feab676a1312e57445bd8aefc81153f6ea 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 be917f43735bba8e8e359f76251cc2a0c306c496..dab486949ead37073d03ddf70783ad935fd0dd87 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 6ffbf1455e45814a97d3ead30326c56219cee940..b4a63d344ec635c9c2c95784870843e34a1a335b 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 95c1614ffd5b222897d0cb4f6962254824a1bfb9..ba417f0e97d994174f7b03bbe0e49e99400b899d 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 739b3b43360835ee7a730a77523da4020ab34a44..e6ed3f6ec1f72397230d0459af977b7ed42fb111 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 98550b7e4520873346118cabe2e27d520db8339a..d5a007fd50601df11f200954ae070dc9b63d7aa7 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 38a29a1871365ad411af9fbc571d1665b2fdaa18..f9c5661b51d833827e771c34938d41c6caaa8eda 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 6b4ae406b2b9f6f894b67e30d2239dc1ebe10b40..49d7e6a2f33ac9fcba2318558d3168a6cbe80d85 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 8b5580cf0c2c4a1d0911590ddcf49f2db27916d7..9cc98556cba5a151903796bb0c68623a26d76c97 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 720aa098ff6de768ef59c51c6e1aace2e70cf9ca..a2eefe6ee54e4a909707b5ddc7a02c7e52a6afa4 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 3b0d8bb7a29e4aa1faec5ae824cbe89c3ead155d..c5037d1226f7862619c64b1df865e523d803156e 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 c229e685aba9f14071ddd715ae8f8dae16f93f6d..3bfc1aa12da3105d490d643943bf33a3501db1dd 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 720e80ec162e7d4c63711bce90231b3f99b69571..1c75e6f65ca0f47cced63b60858c77a5d5861d23 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 e65751e1f9d7fe5922a4d6cb3d2f6a3ed46aec6c..52a2cd24254f5cf4cfcc45866d32e6aa7653a60a 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 0fb7ff8ec38938fa6a78dce1e1b954c1453914b4..67372821631f199e494b3e5f1345703823a3999b 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 a55e054c457e856b27a9ba872c1a728a79035640..65b621b1d7a3928289abedb1fa114e05d9d1f8ee 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 96329ac5d6893e32cc7de0b6ec0038d487e96dc8..267fcb637d0caee1da01445b7b38b757df2826b3 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 5a7616bb2eca465d5514eaf7093a3701240587f5..55675f8a64d7eaaa81f5931f98370b7c3b3cdc55 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 2159aef069578ed83b3866afc338cb01f13f0592..a3289c4cdc0c789f0a30fd9ca6d438cf8fdc2fb3 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 9f6054a5d4fad270901b7fd6f22f234b08af04f9..5bedcfd793f9dd869e010b0cda88900dbc88d5f0 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 ccadf9704b797f9bb467f559a6582fc0ce43a55e..c47d49de99fbc7a0bd4905724ca273c0f427a827 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 305a9331d1de2d73b101d1cdae4df8e82112da3a..1f05f8bb66848684406fc11434a74a0e185234e3 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 9e37f28935108cecff11b31b268c598e3169b62c..21ec46de6af91592dff384c1c1e611c174cbbcec 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 25d19f18d34320e711794130ff34a0afc4307b31..ce8a484eb88178ddc98b8b88ba87f14864153822 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 dcfad455575a89e0914ffe0b592dbe4d4b614081..de6c56246a09259e214008710a9c0fe2a85b6b4c 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 6128c62f670f2998cac45fba3dc2b785ae05f096..f2beb5b10534f926e9091a0c8019e26c84a545b3 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 0fa54c64d951c0cbb5582258636a525eeec5ae27..147ea430b3b895ce1793c8a53905c3ce46daa2cb 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 e5e46d407c9d998de0597da15fc95634d4270712..f4a6d6ed3e5beafdaf8533c4bddd41ec8ec1c080 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 6f552e087d7f007333e4d07adc1179bfbcafa6d6..342cc6b72a375f5d3ea7ab37f03f12fe9716fe8c 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 96c6877820172ea2e63ac2e3340bab9403450ca5..14d951fe8bdc8964cd38137e65da4335b0f42769 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 e0602c20272a533777bd1f4dd91316201119968b..23f13bccfc5d0c8376c3fcda2e0f98fb455b8b43 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 a3a42054cbc369642c5d05b3bee19ccd70f2684c..e54002a85db9f5a1e3890b81afad9d998d691053 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 d147dd277e24d6e99218421497249ffd116d3f0a..70cc643670290926a3ab02e61d854f3d988a059d 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 d7aa7c3377d4b27cbddde7ece9853ee139a4ba13..32754615bf02e6294c27959266e982090dca9672 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 9248b768cb6d2ec91334499736897fa8d622bb85..cae6edaefeec6f75de269427aa1a04a839fe25d2 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 53828ed8ea8046758174fdb2ed888af348c9a923..17387c0a4d315741f3de8c0a8a5b589c21ec44e9 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 e86a4a5febdb30937811ce01744a62ae484399ad..bfc413d6cc25864cd34396d05730c8c95a28728c 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 a9f6beb863835708f2aa7f103805fcc2cf59c091..effa5e34a91e9495d8530a34b38302b0ab45e39b 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 3ec9d9f32ba1c4a15d1d7fa705eb64b4681660d7..ea079d9bdaa890b21286e499d2a412cd7e0a9e7e 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 14ba0c35c23a6f999eefcbc488ca0ab24c416f42..309800e8a83a665889deb60db865a9c9e43f7bc8 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 0d2421e276c1af4bb74df01ac337267fc1e69b57..520a6e659d7a0bd47e6f42db578f1d9247e48b40 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 4f085c84edaab6050c7cd79faa86f10a645c0f89..38f2cd1a306b6c15fb52e88d59b0bb3fa9e4aa71 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 b12ca47bdda86ced078023ffd834256f0defb499..ea3687010ceb263c1246928961d3394676bf0af3 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 ee124e2c06f763ce769bc9cbaf6f51de9ea7c372..abf329b5fd096ed3574d03912cdd8d2a05ea9ca1 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 215dd816a4e806984322d08f50d98a007ecdf78d..2bbcfc0d41c7721cfc1d36213b9c38a8cb7d8fbe 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 1b09526941612981c816b2ed032ed3162d138559..fb9b3985cc2bc2a8916051c105cf15f614308052 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 3c86d0d4d45a8fbe48f0545679fda7f04c16f4e4..90145251fc09d33f9ea6fc3f5cffaa04f30a0d83 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 39467381a66924f7ee2ad2c1d64faf7ee0ec8d87..18aa4694d58244746d05eda555b74eec4457b353 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 6aec8659533f396096fd5937853d0344fb53d97a..8be7cc2d702cf96b3dded8d596555b50b1a80430 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 f75a1c0fb7f089110c38efe3ba80f9c4899ee20c..d1fe841d467a92c52f1464ef8e814cb058da60d4 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 6a0b04346dcacaf3874e96ec0528150cc15091e3..e9e2f702238931a2f600d0546313c188810202cf 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 b608be4c89fe7fa071042bf6ad475ebcf3ccbb3f..3e03a33e82fb1df74fc63bba3f3eec2710082e20 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 820e4a44501e73c86c6c3213ce6e7dd1810f35e6..78728d291d84875a098ccbed34a6c73e64ce9b8e 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 7580563a74f54b2dd42b0d0646d836459d6292ca..fafb19fd05bd0ec9e5aa204e917824caf9c098a6 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 d49544ce42abc8b1157026cb62bded42d502b325..7861a2df79a8c49ffb490deee992a647784988bb 100644 (file)
@@ -85,7 +85,7 @@ protected:
     /// engine
     KX_KetsjiEngine* m_engine;
 
-       /// background colour
+       /// background color
        float  m_background[4];