Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
commitcd972535027a73ba70069051fe9038b6a8b5696a (patch)
treeb50696bddbc710192b89e34fcdd1e82e6c8073b7
parentaca76ddb502cbf0ee7888c3356f9f35240919410 (diff)
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
-rw-r--r--CMakeLists.txt2
-rw-r--r--build_files/cmake/macros.cmake2
-rw-r--r--build_files/scons/config/darwin-config.py2
-rw-r--r--build_files/scons/config/freebsd7-config.py2
-rw-r--r--build_files/scons/config/freebsd8-config.py2
-rw-r--r--build_files/scons/config/freebsd9-config.py2
-rw-r--r--build_files/scons/config/linux2-config.py2
-rw-r--r--build_files/scons/config/linuxcross-config.py2
-rw-r--r--build_files/scons/config/openbsd3-config.py2
-rw-r--r--build_files/scons/config/win32-mingw-config.py2
-rw-r--r--extern/glew/include/GL/glew.h2
-rw-r--r--intern/audaspace/intern/AUD_C-API.h14
-rw-r--r--intern/audaspace/intern/AUD_PyInit.h2
-rw-r--r--intern/ghost/GHOST_Path-api.h6
-rw-r--r--intern/ghost/GHOST_Types.h2
-rw-r--r--intern/guardedalloc/intern/mallocn.c4
-rw-r--r--intern/memutil/MEM_CacheLimiterC-Api.h2
-rw-r--r--intern/opennl/CMakeLists.txt3
-rw-r--r--intern/opennl/extern/ONL_opennl.h2
-rw-r--r--intern/opennl/superlu/util.h2
-rw-r--r--source/blender/blenkernel/BKE_icons.h4
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h8
-rw-r--r--source/blender/blenkernel/BKE_sketch.h4
-rw-r--r--source/blender/blenkernel/BKE_sound.h4
-rw-r--r--source/blender/blenkernel/BKE_suggestions.h18
-rw-r--r--source/blender/blenkernel/intern/cloth.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/icons.c2
-rw-r--r--source/blender/blenkernel/intern/implicit.c2
-rw-r--r--source/blender/blenkernel/intern/material.c2
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c26
-rw-r--r--source/blender/blenkernel/intern/softbody.c6
-rw-r--r--source/blender/blenkernel/intern/suggestions.c4
-rw-r--r--source/blender/blenkernel/intern/text.c2
-rw-r--r--source/blender/blenkernel/intern/writeframeserver.c8
-rw-r--r--source/blender/blenlib/BLI_ghash.h2
-rw-r--r--source/blender/blenlib/BLI_threads.h2
-rw-r--r--source/blender/blenlib/intern/math_color.c2
-rw-r--r--source/blender/blenlib/intern/storage.c2
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c4
-rw-r--r--source/blender/editors/animation/keyingsets.c2
-rw-r--r--source/blender/editors/armature/editarmature.c26
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c7
-rw-r--r--source/blender/editors/armature/meshlaplacian.c4
-rw-r--r--source/blender/editors/armature/poselib.c2
-rw-r--r--source/blender/editors/armature/poseobject.c4
-rw-r--r--source/blender/editors/armature/reeb.h4
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/include/BIF_glutil.h2
-rw-r--r--source/blender/editors/include/UI_interface_icons.h2
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c14
-rw-r--r--source/blender/editors/interface/interface_icons.c6
-rw-r--r--source/blender/editors/interface/interface_layout.c18
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c17
-rw-r--r--source/blender/editors/interface/interface_widgets.c11
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
-rw-r--r--source/blender/editors/mesh/editmesh.c8
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c4
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c5
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c10
-rw-r--r--source/blender/editors/mesh/meshtools.c1
-rw-r--r--source/blender/editors/object/object_edit.c16
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_select.c16
-rw-r--r--source/blender/editors/physics/particle_edit.c38
-rw-r--r--source/blender/editors/render/render_preview.c8
-rw-r--r--source/blender/editors/render/render_shading.c14
-rw-r--r--source/blender/editors/screen/glutil.c13
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_action/action_draw.c2
-rw-r--r--source/blender/editors/space_console/console_draw.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c5
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/filelist.h6
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c1
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c8
-rw-r--r--source/blender/editors/space_info/info_ops.c4
-rw-r--r--source/blender/editors/space_info/space_info.c2
-rw-r--r--source/blender/editors/space_logic/logic_window.c1
-rw-r--r--source/blender/editors/space_nla/nla_draw.c6
-rw-r--r--source/blender/editors/space_outliner/outliner.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c12
-rw-r--r--source/blender/editors/space_text/text_draw.c6
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_text/text_python.c2
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c2
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c11
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c10
-rw-r--r--source/blender/editors/transform/transform.c16
-rw-r--r--source/blender/editors/transform/transform_conversions.c10
-rw-r--r--source/blender/editors/transform/transform_generics.c7
-rw-r--r--source/blender/editors/transform/transform_manipulator.c5
-rw-r--r--source/blender/editors/transform/transform_orientations.c42
-rw-r--r--source/blender/editors/transform/transform_snap.c24
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
-rw-r--r--source/blender/gpu/GPU_buffers.h4
-rw-r--r--source/blender/gpu/GPU_extensions.h6
-rw-r--r--source/blender/gpu/GPU_material.h2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
-rw-r--r--source/blender/imbuf/IMB_thumbs.h2
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c2
-rw-r--r--source/blender/makesdna/DNA_action_types.h4
-rw-r--r--source/blender/makesdna/DNA_armature_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_material.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/nodes/intern/TEX_util.c6
-rw-r--r--source/blender/python/generic/noise.c2
-rw-r--r--source/blender/python/intern/stubs.c14
-rw-r--r--source/blender/render/extern/include/RE_raytrace.h2
-rw-r--r--source/blender/render/intern/source/volumetric.c6
-rw-r--r--source/blender/windowmanager/WM_api.h4
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c6
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c8
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c56
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp1
-rw-r--r--source/gameengine/VideoTexture/FilterBlueScreen.h2
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp2
-rw-r--r--source/gameengine/VideoTexture/ImageRender.h2
137 files changed, 401 insertions, 431 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f25199e67f..d555eb6a4a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}")
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 8fbef8a0784..e421b9600aa 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -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)
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index f23d4a6390b..57bf6aba619 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -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
diff --git a/build_files/scons/config/freebsd7-config.py b/build_files/scons/config/freebsd7-config.py
index a24537fa3c1..fab249cb288 100644
--- a/build_files/scons/config/freebsd7-config.py
+++ b/build_files/scons/config/freebsd7-config.py
@@ -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']
diff --git a/build_files/scons/config/freebsd8-config.py b/build_files/scons/config/freebsd8-config.py
index 505deaf409b..6a4a6ac8c9d 100644
--- a/build_files/scons/config/freebsd8-config.py
+++ b/build_files/scons/config/freebsd8-config.py
@@ -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']
diff --git a/build_files/scons/config/freebsd9-config.py b/build_files/scons/config/freebsd9-config.py
index a857f2925a2..d2f54230a20 100644
--- a/build_files/scons/config/freebsd9-config.py
+++ b/build_files/scons/config/freebsd9-config.py
@@ -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']
diff --git a/build_files/scons/config/linux2-config.py b/build_files/scons/config/linux2-config.py
index 268cb36d9c7..07ff30763c0 100644
--- a/build_files/scons/config/linux2-config.py
+++ b/build_files/scons/config/linux2-config.py
@@ -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']
diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py
index 9ea5db29aaf..5875538f95a 100644
--- a/build_files/scons/config/linuxcross-config.py
+++ b/build_files/scons/config/linuxcross-config.py
@@ -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' ]
diff --git a/build_files/scons/config/openbsd3-config.py b/build_files/scons/config/openbsd3-config.py
index 65c2a1a2585..080e8f013ac 100644
--- a/build_files/scons/config/openbsd3-config.py
+++ b/build_files/scons/config/openbsd3-config.py
@@ -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']
diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py
index 2913d888eaf..76a06095f64 100644
--- a/build_files/scons/config/win32-mingw-config.py
+++ b/build_files/scons/config/win32-mingw-config.py
@@ -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' ]
diff --git a/extern/glew/include/GL/glew.h b/extern/glew/include/GL/glew.h
index 3cb7bed3dda..bee6a071e5d 100644
--- a/extern/glew/include/GL/glew.h
+++ b/extern/glew/include/GL/glew.h
@@ -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)
diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h
index 08f2845de4f..71b5ca82430 100644
--- a/intern/audaspace/intern/AUD_C-API.h
+++ b/intern/audaspace/intern/AUD_C-API.h
@@ -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
}
diff --git a/intern/audaspace/intern/AUD_PyInit.h b/intern/audaspace/intern/AUD_PyInit.h
index 0b80b3a9ae1..6f18bdbe2d1 100644
--- a/intern/audaspace/intern/AUD_PyInit.h
+++ b/intern/audaspace/intern/AUD_PyInit.h
@@ -36,7 +36,7 @@ extern "C" {
/**
* Initalizes the Python module.
*/
-extern PyObject* AUD_initPython();
+extern PyObject* AUD_initPython(void);
#ifdef __cplusplus
}
diff --git a/intern/ghost/GHOST_Path-api.h b/intern/ghost/GHOST_Path-api.h
index c38a4e2de88..60b05f55b90 100644
--- a/intern/ghost/GHOST_Path-api.h
+++ b/intern/ghost/GHOST_Path-api.h
@@ -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
}
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 20b69611bfb..3770bbde425 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -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);
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 20912385f3b..d1e88748de4 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -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();
diff --git a/intern/memutil/MEM_CacheLimiterC-Api.h b/intern/memutil/MEM_CacheLimiterC-Api.h
index 898625a9563..0e53a0b0e0d 100644
--- a/intern/memutil/MEM_CacheLimiterC-Api.h
+++ b/intern/memutil/MEM_CacheLimiterC-Api.h
@@ -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
diff --git a/intern/opennl/CMakeLists.txt b/intern/opennl/CMakeLists.txt
index 9960511eff9..46a22650f4b 100644
--- a/intern/opennl/CMakeLists.txt
+++ b/intern/opennl/CMakeLists.txt
@@ -24,6 +24,9 @@
#
# ***** END GPL LICENSE BLOCK *****
+# External project, better not fix warnings.
+REMOVE_STRICT_FLAGS()
+
SET(INC
extern
superlu
diff --git a/intern/opennl/extern/ONL_opennl.h b/intern/opennl/extern/ONL_opennl.h
index be76aa95eac..c87cb7ef146 100644
--- a/intern/opennl/extern/ONL_opennl.h
+++ b/intern/opennl/extern/ONL_opennl.h
@@ -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
diff --git a/intern/opennl/superlu/util.h b/intern/opennl/superlu/util.h
index 1a3526d4e7e..953242d606d 100644
--- a/intern/opennl/superlu/util.h
+++ b/intern/opennl/superlu/util.h
@@ -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 *);
diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h
index 252191803f2..42cbd22d9f1 100644
--- a/source/blender/blenkernel/BKE_icons.h
+++ b/source/blender/blenkernel/BKE_icons.h
@@ -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);
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 1a9fb2d7404..e3b6ebd1ff8 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -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,
diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h
index c46604f09f0..a59464bb7ba 100644
--- a/source/blender/blenkernel/BKE_sketch.h
+++ b/source/blender/blenkernel/BKE_sketch.h
@@ -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);
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index fb1a3c43006..2d4ea812f57 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -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);
diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h
index 59369d6ac14..9eb8897e0e0 100644
--- a/source/blender/blenkernel/BKE_suggestions.h
+++ b/source/blender/blenkernel/BKE_suggestions.h
@@ -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
}
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index b781b18862c..2469f7f7dbe 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -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 );
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index c1a6200bf60..f92f2326aeb 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -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 */
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 5ef41d17d63..1ed8241325e 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -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 */
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 78306705d6b..30e4318e256 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index bdf71a8c6f0..3d6710b186d 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 8096f0277bb..ac61acac56a 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -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));
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 2efef52ed3e..c11b51b9dd4 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -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;
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 978b3c9864f..ceee544d1b8 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c
index 1b720c1adaa..7d39203cefc 100644
--- a/source/blender/blenkernel/intern/suggestions.c
+++ b/source/blender/blenkernel/intern/suggestions.c
@@ -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;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index bdb8d11945c..b78525d4f4e 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -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
--
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index bbc441f3622..3bdfd6c6b74 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -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);
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index 0e985184f7a..122385ca79a 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -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];
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 6a0a711404c..ad968deb0c5 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -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);
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index c481744156a..09a419b0e04 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -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
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 7144a7dce34..70d9d080c31 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -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];
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 4bc2654e581..13cbfeec2bb 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -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
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 5d96c015caa..9c801d97ba8 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -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;
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 2f6bccff404..9260a3a9953 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -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;
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 5ef13bcdc1b..d043c2e472d 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -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)
{
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index f193defc129..e93775f593b 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -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 *************** */
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index d1430808fca..2ec940d25bc 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -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 ==
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 6b12bafc187..db2e8eb276a 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -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;
diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h
index 3bebc423235..39f83407d74 100644
--- a/source/blender/editors/armature/reeb.h
+++ b/source/blender/editors/armature/reeb.h
@@ -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_*/
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index a2441a82539..5a328d4f26d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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;
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 8f37baf9af1..3fa07da0437 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -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);
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index b698cd610a2..34a390b250e 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -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);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 0f298f5cbef..be54e6a2feb 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -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;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 22f1771923b..8724b7fad28 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -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;
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index e39e594af66..8533e5ba893 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -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;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 4e669746c2f..4c166251268 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -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();
}
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 0747d772cdf..6b834c08456 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -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);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 75daa7633a4..ae75bd03d86 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -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]);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 2a6ab525f89..403c7001b3b 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -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];
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index b6fa0916443..2bc72d717c0 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -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);
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 6be2a018b71..af63b9cf37e 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -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 */
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 424b3c5467f..99b3d4e64ab 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -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)
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 2e095af9c03..70fcca097ef 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -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 ******** */
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index c9934275f3f..af03df34d5c 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -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);
}
}
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2a04859f462..8adf504b7fd 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -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");
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index b7c4011c538..820e287e945 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -33,7 +33,6 @@
#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
#include <math.h>
#include <float.h>
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d9e0140c699..a077e9890b0 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -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;
}
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 5c68917a83a..22d1a2f6b9d 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -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);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b131a358ae7..deda2ce0129 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -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);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 12370e5b1ac..cba64fe6325 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -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 {
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 824ff8b154d..5697154998b 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -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;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 16bdaae2bf5..41aace4e0a7 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -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;
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index a6c4c77e468..6a9fc1489f1 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -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;
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index bd4bae23c7d..68a73e77a38 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -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));
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index ac563621f30..89f44199914 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -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)
{
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 73ca3bad5c2..d15dd7902bf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -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);
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index ce9a96af38c..c1a5453abfe 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -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;
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index f26bc63f01d..d4d1429530c 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -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;
}
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index e8c7cc6c926..405c965ecce 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -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)))
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index fc7ab289683..692953a18a3 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -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);
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 9dd7ab26625..eb1c46d652e 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -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);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index dd3672b656a..4d180d90992 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -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);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 1f92f32cc88..d875aaafd33 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -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
*/
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index cac56d76831..970be9feab6 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -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;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index be917f43735..dab486949ea 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -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;
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 6ffbf1455e4..b4a63d344ec 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -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);
}
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 95c1614ffd5..ba417f0e97d 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -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;
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 739b3b43360..e6ed3f6ec1f 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -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);
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 98550b7e452..d5a007fd506 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -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
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 38a29a18713..f9c5661b51d 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -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;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 6b4ae406b2b..49d7e6a2f33 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -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);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 8b5580cf0c2..9cc98556cba 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -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 */
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 720aa098ff6..a2eefe6ee54 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -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;
}
}
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 3b0d8bb7a29..c5037d1226f 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -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;
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index c229e685aba..3bfc1aa12da 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -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);
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 720e80ec162..1c75e6f65ca 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -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))) {
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index e65751e1f9d..52a2cd24254 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -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;
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 0fb7ff8ec38..67372821631 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -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);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index a55e054c457..65b621b1d7a 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -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);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 96329ac5d68..267fcb637d0 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -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;
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 5a7616bb2ec..55675f8a64d 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -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
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 2159aef0695..a3289c4cdc0 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -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;
}
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 9f6054a5d4f..5bedcfd793f 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -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++;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index ccadf9704b7..c47d49de99f 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -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];
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 305a9331d1d..1f05f8bb668 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -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;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 9e37f289351..21ec46de6af 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -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);
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 25d19f18d34..ce8a484eb88 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -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]);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index dcfad455575..de6c56246a0 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -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]);
}
}
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 6128c62f670..f2beb5b1053 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -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;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 0fa54c64d95..147ea430b3b 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -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);
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index e5e46d407c9..f4a6d6ed3e5 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -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);
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 6f552e087d7..342cc6b72a3 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -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 );
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 96c68778201..14d951fe8bd 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -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,
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index e0602c20272..23f13bccfc5 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -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]);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index a3a42054cbc..e54002a85db 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -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;
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index d147dd277e2..70cc6436702 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -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);
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index d7aa7c3377d..32754615bf0 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -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;
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h
index 9248b768cb6..cae6edaefee 100644
--- a/source/blender/imbuf/IMB_thumbs.h
+++ b/source/blender/imbuf/IMB_thumbs.h
@@ -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);
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 53828ed8ea8..17387c0a4d3 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -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;
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index e86a4a5febd..bfc413d6cc2 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -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),
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index a9f6beb8638..effa5e34a91 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 3ec9d9f32ba..ea079d9bdaa 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 14ba0c35c23..309800e8a83 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0d2421e276c..520a6e659d7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -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 */
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index 4f085c84eda..38f2cd1a306 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -29,11 +29,11 @@
/*
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)
diff --git a/source/blender/python/generic/noise.c b/source/blender/python/generic/noise.c
index b12ca47bdda..ea3687010ce 100644
--- a/source/blender/python/generic/noise.c
+++ b/source/blender/python/generic/noise.c
@@ -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;
diff --git a/source/blender/python/intern/stubs.c b/source/blender/python/intern/stubs.c
index ee124e2c06f..abf329b5fd0 100644
--- a/source/blender/python/intern/stubs.c
+++ b/source/blender/python/intern/stubs.c
@@ -27,11 +27,11 @@
*/
/* 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) {}
diff --git a/source/blender/render/extern/include/RE_raytrace.h b/source/blender/render/extern/include/RE_raytrace.h
index 215dd816a4e..2bbcfc0d41c 100644
--- a/source/blender/render/extern/include/RE_raytrace.h
+++ b/source/blender/render/extern/include/RE_raytrace.h
@@ -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 */
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 1b095269416..fb9b3985cc2 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -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)
{
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 3c86d0d4d45..90145251fc0 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -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);
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 39467381a66..18aa4694d58 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -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);
}
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 6aec8659533..8be7cc2d702 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -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;
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index f75a1c0fb7f..d1fe841d467 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -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)
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6a0b04346dc..e9e2f702238 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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);
}
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index b608be4c89f..3e03a33e82f 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -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),
diff --git a/source/gameengine/VideoTexture/FilterBlueScreen.h b/source/gameengine/VideoTexture/FilterBlueScreen.h
index 820e4a44501..78728d291d8 100644
--- a/source/gameengine/VideoTexture/FilterBlueScreen.h
+++ b/source/gameengine/VideoTexture/FilterBlueScreen.h
@@ -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
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 7580563a74f..fafb19fd05b 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -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();
diff --git a/source/gameengine/VideoTexture/ImageRender.h b/source/gameengine/VideoTexture/ImageRender.h
index d49544ce42a..7861a2df79a 100644
--- a/source/gameengine/VideoTexture/ImageRender.h
+++ b/source/gameengine/VideoTexture/ImageRender.h
@@ -85,7 +85,7 @@ protected:
/// engine
KX_KetsjiEngine* m_engine;
- /// background colour
+ /// background color
float m_background[4];