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-10-17 10:38:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-17 10:38:56 +0400
commit30b79ddcc6e2737add3a7ebd49b167c1776e4087 (patch)
tree8fe9bdba84b7b4cbf9f9ad3b55af892e8eed13bf
parent28e144db920699a13e6cd196ac91f13e11b2877c (diff)
- fixed remaining unused warnings.
- omit render code from this warning (cmake only), until render branch is merged. - moved -Wunused-parameter warning to apply to all C code in blender (not just ./source/blender), (cmake only).
-rw-r--r--CMakeLists.txt8
-rw-r--r--source/blender/CMakeLists.txt5
-rw-r--r--source/blender/avi/intern/avirgb.c4
-rw-r--r--source/blender/avi/intern/mjpeg.c9
-rw-r--r--source/blender/avi/intern/options.c2
-rw-r--r--source/blender/avi/intern/rgb32.c4
-rw-r--r--source/blender/blenkernel/intern/BME_tools.c14
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c19
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c2
-rw-r--r--source/blender/blenkernel/intern/boids.c6
-rw-r--r--source/blender/blenkernel/intern/customdata.c16
-rw-r--r--source/blender/blenkernel/intern/implicit.c6
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c6
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c14
-rw-r--r--source/blender/blenkernel/intern/softbody.c22
-rw-r--r--source/blender/blenkernel/intern/sound.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c8
-rw-r--r--source/blender/editors/animation/keyframes_edit.c34
-rw-r--r--source/blender/editors/armature/meshlaplacian.c10
-rw-r--r--source/blender/editors/armature/reeb.c10
-rw-r--r--source/blender/editors/mesh/mesh_data.c1
-rw-r--r--source/blender/editors/physics/particle_edit.c10
-rw-r--r--source/blender/editors/physics/physics_fluid.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_undo.c1
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
-rw-r--r--source/blender/imbuf/intern/anim.c9
-rw-r--r--source/blender/imbuf/intern/bmp.c4
-rw-r--r--source/blender/imbuf/intern/cineon/cineon_dpx.c2
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.c4
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.c9
-rw-r--r--source/blender/imbuf/intern/filetype.c2
-rw-r--r--source/blender/imbuf/intern/iris.c6
-rw-r--r--source/blender/imbuf/intern/jp2.c2
-rw-r--r--source/blender/imbuf/intern/jpeg.c2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_multi.h23
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c2
-rw-r--r--source/blender/imbuf/intern/targa.c2
-rw-r--r--source/blender/modifiers/intern/MOD_shapekey.c2
-rw-r--r--source/blender/render/CMakeLists.txt3
-rw-r--r--source/blender/render/intern/source/pipeline.c4
-rw-r--r--source/blender/render/intern/source/pointdensity.c2
-rw-r--r--source/blender/render/intern/source/volumetric.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c1
-rw-r--r--source/creator/creator.c44
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp3
46 files changed, 214 insertions, 139 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 287fa50d70a..53ee69bd3e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -318,7 +318,7 @@ IF(UNIX AND NOT APPLE)
SET(PLATFORM_LINKFLAGS "-pthread")
# Better warnings
- # note: -Wunused-parameter should be added but for now only apply to ./source/blender
+ # note: -Wunused-parameter is added below for all GCC compilers
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
@@ -920,6 +920,12 @@ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
#-----------------------------------------------------------------------------
# Extra compile flags
+
+# TODO: remove this and uncommend the global arg, but for now adding here keeps it managable
+IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 83f76e38fd3..7f4ed753956 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -24,11 +24,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-# TODO: remove this and uncommend the global arg, but for now adding here keeps it managable
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-parameter")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
ADD_SUBDIRECTORY(editors)
ADD_SUBDIRECTORY(windowmanager)
ADD_SUBDIRECTORY(blenkernel)
diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c
index f7acbf238b5..c7d411b2fc6 100644
--- a/source/blender/avi/intern/avirgb.c
+++ b/source/blender/avi/intern/avirgb.c
@@ -51,6 +51,8 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
unsigned char *buf;
AviBitmapInfoHeader *bi;
short bits= 32;
+
+ (void)size; /* unused */
bi= (AviBitmapInfoHeader *) movie->streams[stream].sf;
if (bi) bits= bi->BitCount;
@@ -120,6 +122,8 @@ void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buff
int y, x, i, rowstride;
unsigned char *buf;
+ (void)stream; /* unused */
+
*size= movie->header->Height * movie->header->Width * 3;
if (movie->header->Width%2) *size+= movie->header->Height;
diff --git a/source/blender/avi/intern/mjpeg.c b/source/blender/avi/intern/mjpeg.c
index 56ba352dcf8..e8c96476fd1 100644
--- a/source/blender/avi/intern/mjpeg.c
+++ b/source/blender/avi/intern/mjpeg.c
@@ -144,6 +144,8 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign
unsigned int y;
struct jpeg_decompress_struct dinfo;
struct jpeg_error_mgr jerr;
+
+ (void)width; /* unused */
numbytes= 0;
@@ -324,7 +326,9 @@ static void check_and_compress_jpeg(int quality, unsigned char *outbuf, unsigned
void *avi_converter_from_mjpeg (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
int deint;
unsigned char *buf;
-
+
+ (void)stream; /* unused */
+
buf= MEM_mallocN (movie->header->Height * movie->header->Width * 3, "avi.avi_converter_from_mjpeg 1");
deint= check_and_decode_jpeg(buffer, buf, movie->header->Width, movie->header->Height, *size);
@@ -374,10 +378,11 @@ void *avi_converter_to_mjpeg (AviMovie *movie, int stream, unsigned char *buffer
/* Compression from memory */
static void jpegmemdestmgr_init_destination(j_compress_ptr cinfo) {
- ;
+ (void)cinfo; /* unused */
}
static boolean jpegmemdestmgr_empty_output_buffer(j_compress_ptr cinfo) {
+ (void)cinfo; /* unused */
return TRUE;
}
diff --git a/source/blender/avi/intern/options.c b/source/blender/avi/intern/options.c
index 15ec40ade8c..bec7060e118 100644
--- a/source/blender/avi/intern/options.c
+++ b/source/blender/avi/intern/options.c
@@ -41,6 +41,8 @@
AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) {
int i;
+ (void)stream; /* unused */
+
if (movie->header->TotalFrames != 0) /* Can't change params after we have already started writing frames */
return AVI_ERROR_OPTION;
diff --git a/source/blender/avi/intern/rgb32.c b/source/blender/avi/intern/rgb32.c
index 68e3ce4d1d2..f66f57924df 100644
--- a/source/blender/avi/intern/rgb32.c
+++ b/source/blender/avi/intern/rgb32.c
@@ -41,6 +41,8 @@ void *avi_converter_from_rgb32 (AviMovie *movie, int stream, unsigned char *buff
int y, x, rowstridea, rowstrideb;
unsigned char *buf;
+ (void)stream; /* unused */
+
buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromrgb32buf");
*size = movie->header->Height * movie->header->Width * 3;
@@ -65,6 +67,8 @@ void *avi_converter_to_rgb32 (AviMovie *movie, int stream, unsigned char *buffer
unsigned char *buf;
unsigned char *to, *from;
+ (void)stream; /* unused */
+
buf= MEM_mallocN (movie->header->Height * movie->header->Width * 4, "torgb32buf");
*size= movie->header->Height * movie->header->Width * 4;
diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c
index e5a355e5f24..444bc10d562 100644
--- a/source/blender/blenkernel/intern/BME_tools.c
+++ b/source/blender/blenkernel/intern/BME_tools.c
@@ -107,7 +107,7 @@ float *BME_new_transdata_float(BME_TransData_Head *td) {
return BLI_memarena_alloc(td->ma, sizeof(float));
}
-static int BME_is_nonmanifold_vert(BME_Mesh *bm, BME_Vert *v) {
+static int BME_is_nonmanifold_vert(BME_Mesh *UNUSED(bm), BME_Vert *v) {
BME_Edge *e, *oe;
BME_Loop *l;
int len, count, flag;
@@ -217,7 +217,7 @@ static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2,
#endif
-static void BME_data_facevert_edgesplit(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, BME_Edge *e1, float fac){
+static void BME_data_facevert_edgesplit(BME_Mesh *bm, BME_Vert *v1, BME_Vert *UNUSED(v2), BME_Vert *v, BME_Edge *e1, float fac){
void *src[2];
float w[2];
BME_Loop *l=NULL, *v1loop = NULL, *vloop = NULL, *v2loop = NULL;
@@ -356,7 +356,7 @@ static int BME_bevel_get_vec(float *vec, BME_Vert *v1, BME_Vert *v2, BME_TransDa
* vec2 is the direction of projection (pointing away from vec1)
* up_vec is used for orientation (expected to be normalized)
* returns the length of the projected vector that lies along vec1 */
-static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int is_forward, BME_TransData_Head *td) {
+static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int is_forward, BME_TransData_Head *UNUSED(td)) {
float factor, vec3[3], tmp[3],c1,c2;
cross_v3_v3v3(tmp,vec1,vec2);
@@ -582,7 +582,7 @@ static float BME_bevel_set_max(BME_Vert *v1, BME_Vert *v2, float value, BME_Tran
return max;
}
-static BME_Vert *BME_bevel_wire(BME_Mesh *bm, BME_Vert *v, float value, int res, int options, BME_TransData_Head *td) {
+static BME_Vert *BME_bevel_wire(BME_Mesh *bm, BME_Vert *v, float value, int res, int UNUSED(options), BME_TransData_Head *td) {
BME_Vert *ov1, *ov2, *v1, *v2;
ov1 = BME_edge_getothervert(v->edge, v);
@@ -607,7 +607,7 @@ static BME_Vert *BME_bevel_wire(BME_Mesh *bm, BME_Vert *v, float value, int res,
return v1;
}
-static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int options, float *up_vec, BME_TransData_Head *td) {
+static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td) {
BME_Vert *v1, *v2, *kv;
BME_Loop *kl=NULL, *nl;
BME_Edge *e;
@@ -708,7 +708,7 @@ static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int opti
return l;
}
-static BME_Loop *BME_bevel_vert(BME_Mesh *bm, BME_Loop *l, float value, int options, float *up_vec, BME_TransData_Head *td) {
+static BME_Loop *BME_bevel_vert(BME_Mesh *bm, BME_Loop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td) {
BME_Vert *v1, *v2;
BME_Poly *f;
@@ -859,7 +859,7 @@ static void BME_bevel_add_vweight(BME_TransData_Head *td, BME_Mesh *bm, BME_Vert
}
}
-static float BME_bevel_get_angle(BME_Mesh *bm, BME_Edge *e, BME_Vert *v) {
+static float BME_bevel_get_angle(BME_Mesh *UNUSED(bm), BME_Edge *e, BME_Vert *v) {
BME_Vert *v1, *v2;
BME_Loop *l1, *l2;
float vec1[3], vec2[3], vec3[3], vec4[3];
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index bbd68fb797b..1cd5ae381c4 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -15,6 +15,13 @@
#define CCG_INLINE inline
#endif
+/* copied from BKE_utildefines.h ugh */
+#ifdef __GNUC__
+# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
+#else
+# define UNUSED(x) x
+#endif
+
/* used for normalize_v3 in BLI_math_vector
* float.h's FLT_EPSILON causes trouble with subsurf normals - campbell */
#define EPSILON (1.0e-35f)
@@ -185,13 +192,13 @@ static int _ehashIterator_isStopped(EHashIterator *ehi) {
/***/
-static void *_stdAllocator_alloc(CCGAllocatorHDL a, int numBytes) {
+static void *_stdAllocator_alloc(CCGAllocatorHDL UNUSED(a), int numBytes) {
return malloc(numBytes);
}
-static void *_stdAllocator_realloc(CCGAllocatorHDL a, void *ptr, int newSize, int oldSize) {
+static void *_stdAllocator_realloc(CCGAllocatorHDL UNUSED(a), void *ptr, int newSize, int UNUSED(oldSize)) {
return realloc(ptr, newSize);
}
-static void _stdAllocator_free(CCGAllocatorHDL a, void *ptr) {
+static void _stdAllocator_free(CCGAllocatorHDL UNUSED(a), void *ptr) {
free(ptr);
}
@@ -2601,7 +2608,7 @@ float ccgSubSurf_getEdgeCrease(CCGEdge *e) {
/* Face accessors */
-CCGFaceHDL ccgSubSurf_getFaceFaceHandle(CCGSubSurf *ss, CCGFace *f) {
+CCGFaceHDL ccgSubSurf_getFaceFaceHandle(CCGSubSurf *UNUSED(ss), CCGFace *f) {
return f->fHDL;
}
int ccgSubSurf_getFaceAge(CCGSubSurf *ss, CCGFace *f) {
@@ -2619,14 +2626,14 @@ void *ccgSubSurf_getFaceUserData(CCGSubSurf *ss, CCGFace *f) {
int ccgSubSurf_getFaceNumVerts(CCGFace *f) {
return f->numVerts;
}
-CCGVert *ccgSubSurf_getFaceVert(CCGSubSurf *ss, CCGFace *f, int index) {
+CCGVert *ccgSubSurf_getFaceVert(CCGSubSurf *UNUSED(ss), CCGFace *f, int index) {
if (index<0 || index>=f->numVerts) {
return NULL;
} else {
return FACE_getVerts(f)[index];
}
}
-CCGEdge *ccgSubSurf_getFaceEdge(CCGSubSurf *ss, CCGFace *f, int index) {
+CCGEdge *ccgSubSurf_getFaceEdge(CCGSubSurf *UNUSED(ss), CCGFace *f, int index) {
if (index<0 || index>=f->numVerts) {
return NULL;
} else {
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index e70dde1474a..2e8922dec1b 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -633,6 +633,8 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
EditMeshDerivedMesh *emdm= (EditMeshDerivedMesh*) dm;
EditFace *efa;
int i, draw;
+
+ (void)setMaterial; /* unused */
if (emdm->vertexCos) {
EditVert *eve;
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index cfe16e089cf..943cf20720e 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -58,7 +58,7 @@ typedef struct BoidValues {
static int apply_boid_rule(BoidBrainData *bbd, BoidRule *rule, BoidValues *val, ParticleData *pa, float fuzziness);
-static int rule_none(BoidRule *rule, BoidBrainData *UNUSED(data), BoidValues *val, ParticleData *pa)
+static int rule_none(BoidRule *UNUSED(rule), BoidBrainData *UNUSED(data), BoidValues *UNUSED(val), ParticleData *UNUSED(pa))
{
return 0;
}
@@ -344,7 +344,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
return ret;
}
-static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
+static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
{
KDTreeNearest *ptn = NULL;
ParticleTarget *pt;
@@ -384,7 +384,7 @@ static int rule_separate(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Pa
}
return ret;
}
-static int rule_flock(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
+static int rule_flock(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues *UNUSED(val), ParticleData *pa)
{
KDTreeNearest ptn[11];
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 58cd08f1c4c..7f91df3b281 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -145,7 +145,7 @@ static void linklist_free_simple(void *link)
}
static void layerInterp_mdeformvert(void **sources, float *weights,
- float *sub_weights, int count, void *dest)
+ float *UNUSED(sub_weights), int count, void *dest)
{
MDeformVert *dvert = dest;
LinkNode *dest_dw = NULL; /* a list of lists of MDeformWeight pointers */
@@ -203,7 +203,7 @@ static void layerInterp_mdeformvert(void **sources, float *weights,
static void layerInterp_msticky(void **sources, float *weights,
- float *sub_weights, int count, void *dest)
+ float *UNUSED(sub_weights), int count, void *dest)
{
float co[2], w;
MSticky *mst;
@@ -484,8 +484,8 @@ static void layerSwap_mdisps(void *data, const int *ci)
}
}
-static void layerInterp_mdisps(void **UNUSED(sources), float *weights, float *sub_weights,
- int UNUSED(count), void *dest)
+static void layerInterp_mdisps(void **UNUSED(sources), float *UNUSED(weights),
+ float *UNUSED(sub_weights), int UNUSED(count), void *dest)
{
MDisps *d = dest;
int i;
@@ -563,7 +563,7 @@ static void layerCopy_mdisps(const void *source, void *dest, int count)
}
}
-static void layerFree_mdisps(void *data, int count, int size)
+static void layerFree_mdisps(void *data, int count, int UNUSED(size))
{
int i;
MDisps *d = data;
@@ -609,7 +609,7 @@ static int layerWrite_mdisps(CDataFile *cdf, void *data, int count)
return 1;
}
-static size_t layerFilesize_mdisps(CDataFile *cdf, void *data, int count)
+static size_t layerFilesize_mdisps(CDataFile *UNUSED(cdf), void *data, int count)
{
MDisps *d = data;
size_t size = 0;
@@ -2349,7 +2349,7 @@ static void customdata_external_filename(char filename[FILE_MAX], ID *id, Custom
BLI_path_abs(filename, path);
}
-void CustomData_external_reload(CustomData *data, ID *id, CustomDataMask mask, int totelem)
+void CustomData_external_reload(CustomData *data, ID *UNUSED(id), CustomDataMask mask, int totelem)
{
CustomDataLayer *layer;
const LayerTypeInfo *typeInfo;
@@ -2519,7 +2519,7 @@ void CustomData_external_write(CustomData *data, ID *id, CustomDataMask mask, in
cdf_free(cdf);
}
-void CustomData_external_add(CustomData *data, ID *id, int type, int UNUSED(totelem), const char *filename)
+void CustomData_external_add(CustomData *data, ID *UNUSED(id), int type, int UNUSED(totelem), const char *filename)
{
CustomDataExternal *external= data->external;
CustomDataLayer *layer;
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 9baaf7e5abc..e0077ec7d26 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -1218,7 +1218,7 @@ DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float
}
-DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float time)
+DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *UNUSED(lF), lfVector *X, lfVector *V, fmatrix3x3 *UNUSED(dFdV), fmatrix3x3 *UNUSED(dFdX), float time)
{
Cloth *cloth = clmd->clothObject;
ClothVertex *verts = cloth->verts;
@@ -1353,7 +1353,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s,
}
}
-DO_INLINE void cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX)
+DO_INLINE void cloth_apply_spring_force(ClothModifierData *UNUSED(clmd), ClothSpring *s, lfVector *lF, lfVector *UNUSED(X), lfVector *UNUSED(V), fmatrix3x3 *dFdV, fmatrix3x3 *dFdX)
{
if(s->flags & CLOTH_SPRING_FLAG_NEEDED)
{
@@ -1708,7 +1708,7 @@ static void cloth_calc_force(ClothModifierData *clmd, float UNUSED(frame), lfVec
// printf("\n");
}
-static void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv, fmatrix3x3 *M, fmatrix3x3 *bigI)
+static void simulate_implicit_euler(lfVector *Vnew, lfVector *UNUSED(lX), lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *UNUSED(P), fmatrix3x3 *UNUSED(Pinv), fmatrix3x3 *M, fmatrix3x3 *UNUSED(bigI))
{
unsigned int numverts = dFdV[0].vcount;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 09ba967e265..67c3e746a63 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1585,7 +1585,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
/* Baking Tools ------------------------------------------- */
-void BKE_nla_bake (Scene *scene, ID *id, AnimData *adt, int UNUSED(flag))
+void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
{
/* verify that data is valid
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index f7345d6159a..624587338c9 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1647,7 +1647,7 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, float *
return DMCACHE_NOTFOUND;
}
-static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache, float *fw, float foffset, int *mapindex, float *mapfw)
+static int psys_map_index_on_dm(DerivedMesh *dm, int from, int index, int index_dmcache, float *fw, float UNUSED(foffset), int *mapindex, float *mapfw)
{
if(index < 0)
return 0;
@@ -1803,7 +1803,7 @@ ParticleSystemModifierData *psys_get_modifier(Object *ob, ParticleSystem *psys)
/* Particles on a shape */
/************************************************/
/* ready for future use */
-static void psys_particle_on_shape(int UNUSED(distr), int index, float *UNUSED(fuv), float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
+static void psys_particle_on_shape(int UNUSED(distr), int UNUSED(index), float *UNUSED(fuv), float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
/* TODO */
float zerovec[3]={0.0f,0.0f,0.0f};
@@ -2185,7 +2185,7 @@ static void do_rough_end(float *loc, float mat[4][4], float t, float fac, float
VECADDFAC(state->co,state->co,mat[0],rough[0]);
VECADDFAC(state->co,state->co,mat[1],rough[1]);
}
-static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheKey *ca, int k, int steps, float *rootco, float effector, float dfra, float UNUSED(cfra), float *length, float *vec)
+static void do_path_effectors(ParticleSimulationData *sim, int i, ParticleCacheKey *ca, int k, int steps, float *UNUSED(rootco), float effector, float UNUSED(dfra), float UNUSED(cfra), float *length, float *vec)
{
float force[3] = {0.0f,0.0f,0.0f};
ParticleKey eff_key;
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 7ce5dcc3884..6477c6b4f75 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -524,7 +524,7 @@ static void do_alphaover_effect_float(float facf0, float facf1, int x, int y,
}
static struct ImBuf * do_alphaover_effect(
- Main *bmain, Scene *UNUSED(scene), Sequence *UNUSED(seq), float UNUSED(cfra),
+ Main *UNUSED(bmain), Scene *UNUSED(scene), Sequence *UNUSED(seq), float UNUSED(cfra),
float facf0, float facf1, int x, int y,
int UNUSED(preview_render_size),
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
@@ -2633,7 +2633,7 @@ static void copy_glow_effect(Sequence *dst, Sequence *src)
//void do_glow_effect(Cast *cast, float facf0, float facf1, int xo, int yo, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *outbuf, ImBuf *use)
static void do_glow_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
int x, int y, char *rect1,
- char *rect2, char *out)
+ char *UNUSED(rect2), char *out)
{
unsigned char *outbuf=(unsigned char *)out;
unsigned char *inbuf=(unsigned char *)rect1;
@@ -2648,7 +2648,7 @@ static void do_glow_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
static void do_glow_effect_float(Sequence *seq, float facf0, float UNUSED(facf1),
int x, int y,
- float *rect1, float *rect2, float *out)
+ float *rect1, float *UNUSED(rect2), float *out)
{
float *outbuf = out;
float *inbuf = rect1;
@@ -2822,8 +2822,8 @@ static struct ImBuf * do_multicam(
Main *bmain, Scene *scene, Sequence *seq, float cfra,
float UNUSED(facf0), float UNUSED(facf1), int x, int y,
int preview_render_size,
- struct ImBuf *ibuf1, struct ImBuf *ibuf2,
- struct ImBuf *ibuf3)
+ struct ImBuf *UNUSED(ibuf1), struct ImBuf *UNUSED(ibuf2),
+ struct ImBuf *UNUSED(ibuf3))
{
struct ImBuf * i;
struct ImBuf * out;
@@ -2914,7 +2914,7 @@ static int early_out_speed(struct Sequence *UNUSED(seq),
}
static void store_icu_yrange_speed(struct Sequence * seq,
- short adrcode, float * ymin, float * ymax)
+ short UNUSED(adrcode), float * ymin, float * ymax)
{
SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
@@ -3091,7 +3091,7 @@ static int early_out_mul_input2(struct Sequence *UNUSED(seq),
}
static void store_icu_yrange_noop(struct Sequence * UNUSED(seq),
- short adrcode, float * ymin, float * ymax)
+ short UNUSED(adrcode), float *UNUSED(ymin), float *UNUSED(ymax))
{
/* defaults are fine */
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 58aa171e97b..978b3c9864f 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -678,7 +678,7 @@ static void add_mesh_quad_diag_springs(Object *ob)
}
}
-static void add_2nd_order_roller(Object *ob,float stiffness,int *counter, int addsprings)
+static void add_2nd_order_roller(Object *ob,float UNUSED(stiffness), int *counter, int addsprings)
{
/*assume we have a softbody*/
SoftBody *sb= ob->soft; /* is supposed to be there */
@@ -1029,7 +1029,7 @@ static int query_external_colliders(Scene *scene, Object *me)
/* +++ the aabb "force" section*/
-static int sb_detect_aabb_collisionCached( float force[3], unsigned int par_layer,struct Object *vertexowner,float UNUSED(time))
+static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int UNUSED(par_layer),struct Object *vertexowner,float UNUSED(time))
{
Object *ob;
SoftBody *sb=vertexowner->soft;
@@ -1094,7 +1094,7 @@ static int sb_detect_aabb_collisionCached( float force[3], unsigned int par_laye
/* +++ the face external section*/
static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
- float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
+ float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
{
Object *ob;
GHash *hash;
@@ -1192,7 +1192,7 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa
static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
- float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
+ float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
{
Object *ob;
GHash *hash;
@@ -1418,7 +1418,7 @@ static void scan_for_ext_face_forces(Object *ob,float timenow)
/* +++ the spring external section*/
static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],float *damp,
- float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
+ float force[3], unsigned int UNUSED(par_layer),struct Object *vertexowner,float time)
{
Object *ob;
GHash *hash;
@@ -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 *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()))
{
ListBase *do_effector = NULL;
ListBase threads;
@@ -1749,7 +1749,7 @@ static int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,fl
static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *damp,
- float force[3], unsigned int par_layer,struct Object *vertexowner,
+ float force[3], unsigned int UNUSED(par_layer), struct Object *vertexowner,
float time,float vel[3], float *intrusion)
{
Object *ob= NULL;
@@ -2084,7 +2084,7 @@ static void dfdv_goal(int ia, int ic,float factor)
for(i=0;i<3;i++) nlMatrixAdd(ia+i,ic+i,factor);
}
*/
-static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float forcetime,int nl_flags)
+static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UNUSED(forcetime), int nl_flags)
{
SoftBody *sb= ob->soft; /* is supposed to be there */
BodyPoint *bp1,*bp2;
@@ -2175,7 +2175,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float fo
/* 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 *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()),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 *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()),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
{
ListBase threads;
SB_thread_context *sb_threads;
@@ -2444,7 +2444,7 @@ static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float t
MEM_freeN(sb_threads);
}
-static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, float timenow, int nl_flags)
+static void softbody_calc_forcesEx(Scene *scene, Object *ob, float forcetime, float timenow, int UNUSED(nl_flags))
{
/* rule we never alter free variables :bp->vec bp->pos in here !
* this will ruin adaptive stepsize AKA heun! (BM)
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index ca1fd80b406..b2e5209a4fc 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -110,6 +110,8 @@ void sound_init(struct Main *bmain)
#ifdef WITH_JACK
AUD_setSyncCallback(sound_sync_callback, bmain);
+#else
+ (void)bmain; /* unused */
#endif
}
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 6323e1e3c79..26bd981db4a 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -83,13 +83,13 @@ static void *arena_realloc(CCGAllocatorHDL a, void *ptr, int newSize, int oldSiz
}
return p2;
}
-static void arena_free(CCGAllocatorHDL a, void *ptr) {
+static void arena_free(CCGAllocatorHDL UNUSED(a), void *UNUSED(ptr)) {
}
static void arena_release(CCGAllocatorHDL a) {
BLI_memarena_free(a);
}
-static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, int useAging, int useArena, int useFlatSubdiv) {
+static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, int useAging, int useArena, int UNUSED(useFlatSubdiv)) {
CCGMeshIFC ifc;
CCGSubSurf *ccgSS;
@@ -1146,7 +1146,7 @@ static void ccgDM_drawVerts(DerivedMesh *dm) {
ccgFaceIterator_free(fi);
glEnd();
}
-static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges) {
+static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) {
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = ccgdm->ss;
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
@@ -1514,7 +1514,7 @@ static void ccgDM_drawFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *a
dm->drawMappedFacesGLSL(dm, setMaterial, NULL, NULL);
}
-static void ccgDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned char *col1, unsigned char *col2) {
+static void ccgDM_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsigned char *col1, unsigned char *col2) {
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = ccgdm->ss;
CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 590d609ce02..0958b4870b5 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -541,7 +541,7 @@ static short ok_bezier_framerange(KeyframeEditData *ked, BezTriple *bezt)
return ok;
}
-static short ok_bezier_selected(KeyframeEditData *ked, BezTriple *bezt)
+static short ok_bezier_selected(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
/* this macro checks all beztriple handles for selection...
* only one of the verts has to be selected for this to be ok...
@@ -677,7 +677,7 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt)
/* Transform */
/* snaps the keyframe to the nearest frame */
-static short snap_bezier_nearest(KeyframeEditData *ked, BezTriple *bezt)
+static short snap_bezier_nearest(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
bezt->vec[1][0]= (float)(floor(bezt->vec[1][0]+0.5));
@@ -713,7 +713,7 @@ static short snap_bezier_nearmarker(KeyframeEditData *ked, BezTriple *bezt)
}
/* make the handles have the same value as the key */
-static short snap_bezier_horizontal(KeyframeEditData *ked, BezTriple *bezt)
+static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT) {
bezt->vec[0][1]= bezt->vec[2][1]= bezt->vec[1][1];
@@ -768,7 +768,7 @@ static short mirror_bezier_cframe(KeyframeEditData *ked, BezTriple *bezt)
return 0;
}
-static short mirror_bezier_yaxis(KeyframeEditData *ked, BezTriple *bezt)
+static short mirror_bezier_yaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
float diff;
@@ -780,7 +780,7 @@ static short mirror_bezier_yaxis(KeyframeEditData *ked, BezTriple *bezt)
return 0;
}
-static short mirror_bezier_xaxis(KeyframeEditData *ked, BezTriple *bezt)
+static short mirror_bezier_xaxis(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
float diff;
@@ -841,7 +841,7 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
/* Settings */
/* Sets the selected bezier handles to type 'auto' */
-static short set_bezier_auto(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
if (bezt->f1 & SELECT) bezt->h1= HD_AUTO; /* the secret code for auto */
@@ -859,7 +859,7 @@ static short set_bezier_auto(KeyframeEditData *ked, BezTriple *bezt)
}
/* Sets the selected bezier handles to type 'vector' */
-static short set_bezier_vector(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezier_vector(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if ((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
if (bezt->f1 & SELECT) bezt->h1= HD_VECT;
@@ -879,7 +879,7 @@ static short set_bezier_vector(KeyframeEditData *ked, BezTriple *bezt)
/* Queries if the handle should be set to 'free' or 'align' */
// NOTE: this was used for the 'toggle free/align' option
// currently this isn't used, but may be restored later
-static short bezier_isfree(KeyframeEditData *ked, BezTriple *bezt)
+static short bezier_isfree(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if ((bezt->f1 & SELECT) && (bezt->h1)) return 1;
if ((bezt->f3 & SELECT) && (bezt->h2)) return 1;
@@ -887,7 +887,7 @@ static short bezier_isfree(KeyframeEditData *ked, BezTriple *bezt)
}
/* Sets selected bezier handles to type 'align' */
-static short set_bezier_align(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezier_align(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f1 & SELECT) bezt->h1= HD_ALIGN;
if (bezt->f3 & SELECT) bezt->h2= HD_ALIGN;
@@ -895,7 +895,7 @@ static short set_bezier_align(KeyframeEditData *ked, BezTriple *bezt)
}
/* Sets selected bezier handles to type 'free' */
-static short set_bezier_free(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f1 & SELECT) bezt->h1= HD_FREE;
if (bezt->f3 & SELECT) bezt->h2= HD_FREE;
@@ -925,21 +925,21 @@ KeyframeEditFunc ANIM_editkeyframes_handles(short code)
/* ------- */
-static short set_bezt_constant(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezt_constant(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
bezt->ipo= BEZT_IPO_CONST;
return 0;
}
-static short set_bezt_linear(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezt_linear(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
bezt->ipo= BEZT_IPO_LIN;
return 0;
}
-static short set_bezt_bezier(KeyframeEditData *ked, BezTriple *bezt)
+static short set_bezt_bezier(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
bezt->ipo= BEZT_IPO_BEZ;
@@ -962,21 +962,21 @@ KeyframeEditFunc ANIM_editkeyframes_ipo(short code)
/* ------- */
-static short set_keytype_keyframe(KeyframeEditData *ked, BezTriple *bezt)
+static short set_keytype_keyframe(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
BEZKEYTYPE(bezt)= BEZT_KEYTYPE_KEYFRAME;
return 0;
}
-static short set_keytype_breakdown(KeyframeEditData *ked, BezTriple *bezt)
+static short set_keytype_breakdown(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
BEZKEYTYPE(bezt)= BEZT_KEYTYPE_BREAKDOWN;
return 0;
}
-static short set_keytype_extreme(KeyframeEditData *ked, BezTriple *bezt)
+static short set_keytype_extreme(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
BEZKEYTYPE(bezt)= BEZT_KEYTYPE_EXTREME;
@@ -1038,7 +1038,7 @@ static short select_bezier_subtract(KeyframeEditData *ked, BezTriple *bezt)
return 0;
}
-static short select_bezier_invert(KeyframeEditData *ked, BezTriple *bezt)
+static short select_bezier_invert(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
/* Invert the selection for the whole bezier triple */
bezt->f2 ^= SELECT;
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 10627f95aa7..f193defc129 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -61,7 +61,7 @@
/* ************* XXX *************** */
-static void waitcursor(int val) {}
+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() {}
@@ -398,7 +398,7 @@ typedef struct BVHCallbackUserData {
LaplacianSystem *sys;
} BVHCallbackUserData;
-static void bvh_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
+static void bvh_callback(void *userdata, int index, const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit)
{
BVHCallbackUserData *data = (struct BVHCallbackUserData*)userdata;
MFace *mf = data->sys->heat.mface + index;
@@ -1401,7 +1401,7 @@ static void meshdeform_bind_floodfill(MeshDeformBind *mdb)
MEM_freeN(stack);
}
-static float meshdeform_boundary_phi(MeshDeformBind *mdb, MDefBoundIsect *isect, int cagevert)
+static float meshdeform_boundary_phi(MeshDeformBind *UNUSED(mdb), MDefBoundIsect *isect, int cagevert)
{
int a;
@@ -1412,7 +1412,7 @@ static float meshdeform_boundary_phi(MeshDeformBind *mdb, MDefBoundIsect *isect,
return 0.0f;
}
-static float meshdeform_interp_w(MeshDeformBind *mdb, float *gridvec, float *vec, int cagevert)
+static float meshdeform_interp_w(MeshDeformBind *mdb, float *gridvec, float *UNUSED(vec), int UNUSED(cagevert))
{
float dvec[3], ivec[3], wx, wy, wz, result=0.0f;
float weight, totweight= 0.0f;
@@ -1563,7 +1563,7 @@ static void meshdeform_matrix_add_semibound_phi(MeshDeformBind *mdb, int x, int
}
}
-static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y, int z, int cagevert)
+static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y, int z, int UNUSED(cagevert))
{
float phi, totweight;
int i, a, acenter;
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 32362afca2b..5af1658a83f 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -442,7 +442,7 @@ void flipArc(ReebArc *arc)
}
#ifdef DEBUG_REEB_NODE
-void NodeDegreeDecrement(ReebGraph *rg, ReebNode *node)
+void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node)
{
node->degree--;
@@ -452,7 +452,7 @@ void NodeDegreeDecrement(ReebGraph *rg, ReebNode *node)
// }
}
-void NodeDegreeIncrement(ReebGraph *rg, ReebNode *node)
+void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node)
{
// if (node->degree == 0)
// {
@@ -523,7 +523,7 @@ void verifyNodeDegree(ReebGraph *rg)
#endif
}
-void verifyBucketsArc(ReebGraph *rg, ReebArc *arc)
+void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
{
ReebNode *head = (ReebNode*)arc->head;
ReebNode *tail = (ReebNode*)arc->tail;
@@ -1723,7 +1723,7 @@ int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold))
return filtered;
}
-int filterSmartReebGraph(ReebGraph *rg, float UNUSED(threshold))
+int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
{
int value = 0;
#if 0 //XXX
@@ -2180,7 +2180,7 @@ void addFacetoArc(ReebArc *arc, EditFace *efa)
BLI_ghash_insert(arc->faces, efa, efa);
}
-void mergeArcFaces(ReebGraph *rg, ReebArc *aDst, ReebArc *aSrc)
+void mergeArcFaces(ReebGraph *UNUSED(rg), ReebArc *aDst, ReebArc *aSrc)
{
GHashIterator ghi;
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 03f2bb42b51..080151a8dca 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -288,7 +288,6 @@ static int layers_poll(bContext *C)
static int uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Mesh *me= ob->data;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 796314ba2e3..57867fdc441 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1125,7 +1125,7 @@ static void update_world_cos(Object *ob, PTCacheEdit *edit)
}
}
}
-static void update_velocities(Object *ob, PTCacheEdit *edit)
+static void update_velocities(PTCacheEdit *edit)
{
/*TODO: get frs_sec properly */
float vec1[3], vec2[3], frs_sec, dfra;
@@ -1208,7 +1208,7 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
if(edit->psys)
update_world_cos(ob, edit);
if(pset->flag & PE_AUTO_VELOCITY)
- update_velocities(ob, edit);
+ update_velocities(edit);
PE_hide_keys_time(scene, edit, CFRA);
/* regenerate path caches */
@@ -1243,7 +1243,7 @@ static void select_key(PEData *data, int point_index, int key_index)
point->flag |= PEP_EDIT_RECALC;
}
-static void select_keys(PEData *data, int point_index, int key_index)
+static void select_keys(PEData *data, int point_index, int UNUSED(key_index))
{
PTCacheEdit *edit = data->edit;
PTCacheEditPoint *point = edit->points + point_index;
@@ -3034,7 +3034,7 @@ static void brush_puff(PEData *data, int point_index)
}
-static void brush_weight(PEData *data, float UNUSED(mat[][4]), float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
+static void brush_weight(PEData *data, float UNUSED(mat[][4]), float UNUSED(imat[][4]), int point_index, int key_index, PTCacheEditKey *UNUSED(key))
{
/* roots have full weight allways */
if(key_index) {
@@ -3048,7 +3048,7 @@ static void brush_weight(PEData *data, float UNUSED(mat[][4]), float imat[][4],
}
}
-static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
+static void brush_smooth_get(PEData *data, float mat[][4], float UNUSED(imat[][4]), int UNUSED(point_index), int key_index, PTCacheEditKey *key)
{
if(key_index) {
float dvec[3];
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index e4934269173..6dc4684d815 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -342,7 +342,7 @@ static void free_all_fluidobject_channels(ListBase *fobjects)
}
}
-static void fluid_init_all_channels(bContext *C, Object *fsDomain, FluidsimSettings *domainSettings, FluidAnimChannels *channels, ListBase *fobjects)
+static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), FluidsimSettings *domainSettings, FluidAnimChannels *channels, ListBase *fobjects)
{
Scene *scene = CTX_data_scene(C);
Base *base;
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c
index c21bbadc242..643e2cd6915 100644
--- a/source/blender/editors/sculpt_paint/paint_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_undo.c
@@ -31,6 +31,7 @@
#include "BLI_listbase.h"
+#include "BKE_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index a3252ca7621..505e37d95f6 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -867,6 +867,8 @@ static void calc_area_normal(Sculpt *sd, SculptSession *ss, float an[3], PBVHNod
float out_flip[3] = {0.0f, 0.0f, 0.0f};
+ (void)sd; /* unused w/o openmp */
+
zero_v3(an);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
@@ -1667,6 +1669,8 @@ static void calc_flatten_center(Sculpt *sd, SculptSession *ss, PBVHNode **nodes,
float count = 0;
+ (void)sd; /* unused w/o openmp */
+
zero_v3(fc);
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
@@ -1721,6 +1725,8 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, SculptSession *ss, P
// fc
float count = 0;
+ (void)sd; /* unused w/o openmp */
+
// an
zero_v3(an);
@@ -2536,6 +2542,8 @@ static void sculpt_combine_proxies(Sculpt *sd, SculptSession *ss)
calculate multiple modifications to the mesh when symmetry is enabled. */
static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, const char axis, const float angle, const float UNUSED(feather))
{
+ (void)sd; /* unused */
+
flip_coord(cache->location, cache->true_location, symm);
flip_coord(cache->grab_delta_symmetry, cache->grab_delta, symm);
flip_coord(cache->view_normal, cache->true_view_normal, symm);
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index 57d65bc6761..8df0d69bcfa 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -63,6 +63,7 @@
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
+#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BKE_depsgraph.h"
@@ -214,14 +215,14 @@ int ismovie(char *name) {
#else
-int ismovie(char *name) {
+int ismovie(char *UNUSED(name)) {
return 0;
}
/* never called, just keep the linker happy */
-static int startmovie(struct anim * anim) { return 1; }
-static ImBuf * movie_fetchibuf(struct anim * anim, int position) { return NULL; }
-static void free_anim_movie(struct anim * anim) { ; }
+static int startmovie(struct anim *UNUSED(anim)) { return 1; }
+static ImBuf * movie_fetchibuf(struct anim *UNUSED(anim), int UNUSED(position)) { return NULL; }
+static void free_anim_movie(struct anim *UNUSED(anim)) { ; }
#endif
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 4c7cf669d18..10dc23b1ad2 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -108,6 +108,8 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
int x, y, depth, skip, i;
unsigned char *bmp, *rect;
unsigned short col;
+
+ (void)size; /* unused */
if (checkbmp(mem) == 0) return(0);
@@ -199,6 +201,8 @@ int imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
int bytesize, extrabytes, x, y, t, ptr;
uchar *data;
FILE *ofile;
+
+ (void)flags; /* unused */
extrabytes = (4 - ibuf->x*3 % 4) % 4;
bytesize = (ibuf->x * 3 + extrabytes) * ibuf->y;
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c
index 0eee1bd082a..7a5a3fb011b 100644
--- a/source/blender/imbuf/intern/cineon/cineon_dpx.c
+++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c
@@ -125,6 +125,8 @@ static int imb_save_dpx_cineon(ImBuf *buf, char *filename, int use_cineon, int f
int i, j;
int index;
float *fline;
+
+ (void)flags; /* unused */
cineon_conversion_parameters(&conversion);
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index 9c9156a4dd9..a2a0fae526d 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -185,6 +185,8 @@ dumpCineonImageInfo(CineonImageInformation* imageInfo) {
static void
fillCineonFormatInfo(CineonFile* cineon, CineonFormatInformation* formatInfo) {
+ (void)cineon; /* unused */
+
formatInfo->interleave = 0;
formatInfo->packing = 5;
formatInfo->signage = 0;
@@ -238,6 +240,8 @@ dumpCineonFormatInfo(CineonFormatInformation* formatInfo) {
static void
fillCineonOriginationInfo(CineonFile* cineon,
CineonOriginationInformation* originInfo, CineonFileInformation* fileInfo) {
+
+ (void)cineon; /* unused */
originInfo->x_offset = htonl(0);
originInfo->y_offset = htonl(0);
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c
index 365d56939ed..ade69b4d7c0 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.c
+++ b/source/blender/imbuf/intern/cineon/dpxlib.c
@@ -39,6 +39,8 @@
static void
fillDpxChannelInfo(DpxFile* dpx, DpxChannelInformation* chan, int des) {
+ (void)dpx; /* unused */
+
chan->signage = 0;
chan->ref_low_data = htonl(0);
chan->ref_low_quantity = htonf(0.0);
@@ -160,7 +162,12 @@ dumpDpxImageInfo(DpxImageInformation* imageInfo) {
static void
fillDpxOriginationInfo(
- DpxFile* dpx, DpxOriginationInformation* originInfo, DpxFileInformation* fileInfo) {
+ DpxFile* dpx, DpxOriginationInformation* originInfo, DpxFileInformation* fileInfo)
+{
+ /* unused */
+ (void)dpx;
+ (void)originInfo;
+ (void)fileInfo;
}
static void
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index fb5d2f2e4d7..0702fbe3907 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -45,7 +45,7 @@ static int imb_ftype_default(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftyp
#if defined(__APPLE__) && defined(IMBUF_COCOA)
static int imb_ftype_cocoa(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype & TIF); }
#endif
-static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype == IMAGIC); }
+static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { (void)type; return (ibuf->ftype == IMAGIC); }
#ifdef WITH_QUICKTIME
static int imb_ftype_quicktime(ImFileType *type, ImBuf *ibuf) { return 0; } // XXX
#endif
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 9037285a1c5..71ba9b06cad 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -123,7 +123,8 @@ static int file_offset;
static unsigned short getshort(FILE *inf)
{
unsigned char * buf;
-
+ (void)inf; /* unused */
+
buf = file_data + file_offset;
file_offset += 2;
@@ -133,6 +134,7 @@ static unsigned short getshort(FILE *inf)
static unsigned int getlong(FILE *inf)
{
unsigned char * buf;
+ (void)inf; /* unused */
buf = file_data + file_offset;
file_offset += 4;
@@ -258,6 +260,8 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
int bpp, rle, cur, badorder;
ImBuf * ibuf;
+ (void)size; /* unused */
+
if(!imb_is_a_iris(mem)) return NULL;
/*printf("new iris\n");*/
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 5e7ef199500..0403d0044f5 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -670,6 +670,8 @@ int imb_savejp2(struct ImBuf *ibuf, char *name, int flags) {
opj_event_mgr_t event_mgr; /* event manager */
opj_image_t *image = NULL;
+ (void)flags; /* unused */
+
/*
configure the event callbacks (not required)
setting of each callback is optionnal
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index e020a5fa8fd..e7737e68fce 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -132,6 +132,7 @@ typedef my_source_mgr * my_src_ptr;
static void init_source(j_decompress_ptr cinfo)
{
+ (void)cinfo; /* unused */
}
@@ -165,6 +166,7 @@ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
static void term_source(j_decompress_ptr cinfo)
{
+ (void)cinfo; /* unused */
}
static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t size)
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index 3f80e5577a8..e96b52e121d 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -67,24 +67,27 @@ void IMB_exr_close (void *handle);
/* ugly... but we only use it on pipeline.c, render module, now */
void * IMB_exr_get_handle (void) {return NULL;}
-void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) {}
+void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
-int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) {return 0;}
+int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) { (void)handle; (void)filename; (void)width; (void)height; return 0;}
void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) { (void)handle; (void)filename; (void)width; (void)height; (void)compress; }
-void IMB_exrtile_begin_write (void *handle, char *filename, int mipmap, int width, int height, int tilex, int tiley) {}
+void IMB_exrtile_begin_write (void *handle, char *filename, int mipmap, int width, int height, int tilex, int tiley) { (void)handle; (void)filename; (void)mipmap; (void)width; (void)height; (void)tilex; (void)tiley; }
-void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) {}
+void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
-void IMB_exr_read_channels (void *handle) {}
-void IMB_exr_write_channels (void *handle) {}
-void IMB_exrtile_write_channels (void *handle, int partx, int party, int level) {}
-void IMB_exrtile_clear_channels (void *handle) {}
+void IMB_exr_read_channels (void *handle) { (void)handle; }
+void IMB_exr_write_channels (void *handle) { (void)handle; }
+void IMB_exrtile_write_channels (void *handle, int partx, int party, int level) { (void)handle; (void)partx; (void)party; (void)level; }
+void IMB_exrtile_clear_channels (void *handle) { (void)handle; }
void IMB_exr_multilayer_convert (void *handle, void *base,
void * (*addlayer)(void *base, char *str),
- void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id)) {}
+ void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id))
+ {
+ (void)handle; (void)base; (void)addlayer; (void)addpass;
+ }
-void IMB_exr_close (void *handle) {}
+void IMB_exr_close (void *handle) { (void)handle; }
#endif
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 385124cd717..b356f56ab74 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -340,6 +340,8 @@ int imb_savehdr(struct ImBuf *ibuf, char *name, int flags)
int y, width=ibuf->x, height=ibuf->y;
unsigned char *cp= NULL;
+ (void)flags; /* unused */
+
if (file==NULL) return 0;
writeHeader(file, width, height);
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index e50e445034e..89a69242a46 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -238,6 +238,8 @@ int imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
char buf[20];
FILE *fildes;
short ok = 0;
+
+ (void)flags; /* unused */
if (ibuf == 0) return (0);
if (ibuf->rect == 0) return (0);
diff --git a/source/blender/modifiers/intern/MOD_shapekey.c b/source/blender/modifiers/intern/MOD_shapekey.c
index ff2f7c5e3b7..a43e19a5fc1 100644
--- a/source/blender/modifiers/intern/MOD_shapekey.c
+++ b/source/blender/modifiers/intern/MOD_shapekey.c
@@ -85,6 +85,8 @@ static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
KeyBlock *kb= ob_get_keyblock(ob);
float scale[3][3];
int a;
+
+ (void)vertexCos; /* unused */
if(kb && kb->totelem==numVerts && kb!=key->refkey) {
scale_m3_fl(scale, kb->curval);
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 8e0dbb457e8..e6478098dad 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -24,6 +24,9 @@
#
# ***** END GPL LICENSE BLOCK *****
+# remove warning until render branch merged.
+STRING(REGEX REPLACE "-Wunused-parameter" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+
FILE(GLOB SRC intern/source/*.c intern/raytrace/*.cpp)
SET(INC
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index ed390fe102a..a2f08d96251 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -861,7 +861,7 @@ static void *ml_addlayer_cb(void *base, char *str)
BLI_strncpy(rl->name, str, EXR_LAY_MAXNAME);
return rl;
}
-static void ml_addpass_cb(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id)
+static void ml_addpass_cb(void *UNUSED(base), void *lay, char *str, float *rect, int totchan, char *chan_id)
{
RenderLayer *rl= lay;
RenderPass *rpass= MEM_callocN(sizeof(RenderPass), "loaded pass");
@@ -2677,7 +2677,7 @@ static int is_rendering_allowed(Render *re)
return 1;
}
-static void update_physics_cache(Render *re, Scene *scene, int anim_init)
+static void update_physics_cache(Render *re, Scene *scene, int UNUSED(anim_init))
{
PTCacheBaker baker;
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 1ca1ea10273..d8156594085 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -253,7 +253,7 @@ static void cache_pointdensity(Render *re, Tex *tex)
}
}
-static void free_pointdensity(Render *re, Tex *tex)
+static void free_pointdensity(Render *UNUSED(re), Tex *tex)
{
PointDensity *pd = tex->pd;
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index d15ea0c792c..f3f31bf6b43 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -358,7 +358,7 @@ void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
/* phase function - determines in which directions the light
* is scattered in the volume relative to incoming direction
* and view direction */
-float vol_get_phasefunc(ShadeInput *shi, float g, float *w, float *wp)
+float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp)
{
const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI)
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 7bcbe0db341..5fa09cebf29 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -42,6 +42,7 @@ struct CSG_FaceIteratorDescriptor;
struct CSG_VertexIteratorDescriptor;
struct ColorBand;
struct CurveMapping;
+struct Curve;
struct EditBone;
struct EditFace;
struct EditMesh;
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 70c9fae0427..912ae9f3d90 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -138,7 +138,7 @@ static void setCallbacks(void);
/* set breakpoints here when running in debug mode, useful to catch floating point errors */
#if defined(__sgi) || defined(__linux__) || defined(_WIN32) || OSX_SSE_FPE
-static void fpe_handler(int sig)
+static void fpe_handler(int UNUSED(sig))
{
// printf("SIGFPE trapped\n");
}
@@ -175,7 +175,7 @@ static void strip_quotes(char *str)
}
#endif
-static int print_version(int argc, char **argv, void *data)
+static int print_version(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
printf (BLEND_VERSION_STRING_FMT);
#ifdef BUILD_DATE
@@ -190,7 +190,7 @@ static int print_version(int argc, char **argv, void *data)
return 0;
}
-static int print_help(int argc, char **argv, void *data)
+static int print_help(int UNUSED(argc), char **UNUSED(argv), void *data)
{
bArgs *ba = (bArgs*)data;
@@ -317,30 +317,30 @@ double PIL_check_seconds_timer(void);
}
}*/
-static int end_arguments(int argc, char **argv, void *data)
+static int end_arguments(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
return -1;
}
-static int enable_python(int argc, char **argv, void *data)
+static int enable_python(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
G.f |= G_SCRIPT_AUTOEXEC;
return 0;
}
-static int disable_python(int argc, char **argv, void *data)
+static int disable_python(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
G.f &= ~G_SCRIPT_AUTOEXEC;
return 0;
}
-static int background_mode(int argc, char **argv, void *data)
+static int background_mode(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
G.background = 1;
return 0;
}
-static int debug_mode(int argc, char **argv, void *data)
+static int debug_mode(int UNUSED(argc), char **UNUSED(argv), void *data)
{
G.f |= G_DEBUG; /* std output printf's */
printf(BLEND_VERSION_STRING_FMT);
@@ -354,7 +354,7 @@ static int debug_mode(int argc, char **argv, void *data)
return 0;
}
-static int set_fpe(int argc, char **argv, void *data)
+static int set_fpe(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
#if defined(__sgi) || defined(__linux__) || defined(_WIN32) || OSX_SSE_FPE
/* zealous but makes float issues a heck of a lot easier to find!
@@ -379,7 +379,7 @@ static int set_fpe(int argc, char **argv, void *data)
return 0;
}
-static int playback_mode(int argc, char **argv, void *data)
+static int playback_mode(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
/* not if -b was given first */
if (G.background == 0) {
@@ -391,7 +391,7 @@ static int playback_mode(int argc, char **argv, void *data)
return -2;
}
-static int prefsize(int argc, char **argv, void *data)
+static int prefsize(int argc, char **argv, void *UNUSED(data))
{
int stax, stay, sizx, sizy;
@@ -410,19 +410,19 @@ static int prefsize(int argc, char **argv, void *data)
return 4;
}
-static int with_borders(int argc, char **argv, void *data)
+static int with_borders(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
WM_setinitialstate_normal();
return 0;
}
-static int without_borders(int argc, char **argv, void *data)
+static int without_borders(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
WM_setinitialstate_fullscreen();
return 0;
}
-static int register_extension(int argc, char **argv, void *data)
+static int register_extension(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
#ifdef WIN32
char *path = BLI_argsArgv(data)[0];
@@ -432,7 +432,7 @@ static int register_extension(int argc, char **argv, void *data)
return 0;
}
-static int no_joystick(int argc, char **argv, void *data)
+static int no_joystick(int UNUSED(argc), char **UNUSED(argv), void *data)
{
SYS_SystemHandle *syshandle = data;
@@ -446,19 +446,19 @@ static int no_joystick(int argc, char **argv, void *data)
return 0;
}
-static int no_glsl(int argc, char **argv, void *data)
+static int no_glsl(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
GPU_extensions_disable();
return 0;
}
-static int no_audio(int argc, char **argv, void *data)
+static int no_audio(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
sound_force_device(0);
return 0;
}
-static int set_audio(int argc, char **argv, void *data)
+static int set_audio(int argc, char **argv, void *UNUSED(data))
{
if (argc < 1) {
printf("-setaudio require one argument\n");
@@ -583,7 +583,7 @@ static int set_image_type(int argc, char **argv, void *data)
}
}
-static int set_threads(int argc, char **argv, void *data)
+static int set_threads(int argc, char **argv, void *UNUSED(data))
{
if (argc >= 1) {
if(G.background) {
@@ -714,7 +714,7 @@ static int render_frame(int argc, char **argv, void *data)
}
}
-static int render_animation(int argc, char **argv, void *data)
+static int render_animation(int UNUSED(argc), char **UNUSED(argv), void *data)
{
bContext *C = data;
if (CTX_data_scene(C)) {
@@ -848,7 +848,7 @@ static int run_python(int argc, char **argv, void *data)
#endif /* DISABLE_PYTHON */
}
-static int run_python_console(int argc, char **argv, void *data)
+static int run_python_console(int UNUSED(argc), char **argv, void *data)
{
#ifndef DISABLE_PYTHON
bContext *C = data;
@@ -863,7 +863,7 @@ static int run_python_console(int argc, char **argv, void *data)
#endif /* DISABLE_PYTHON */
}
-static int load_file(int argc, char **argv, void *data)
+static int load_file(int UNUSED(argc), char **argv, void *data)
{
bContext *C = data;
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index e02b5fedaf0..a985decabe4 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -284,8 +284,9 @@ void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode,
int width,
int height)
{
+ /*
STR_String tmpstr(text);
- char* s = tmpstr.Ptr();
+ char* s = tmpstr.Ptr(); */
// Save and change OpenGL settings
int texture2D;