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:
-rw-r--r--build_files/cmake/macros.cmake13
-rw-r--r--intern/guardedalloc/cpp/mallocn.cpp12
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.h4
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.h2
-rw-r--r--source/blender/editors/interface/view2d.c6
-rw-r--r--source/blender/makesrna/intern/makesrna.c25
-rw-r--r--source/blender/makesrna/intern/rna_define.c3
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c12
-rw-r--r--source/blender/render/intern/raytrace/bvh.h2
12 files changed, 52 insertions, 34 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 61a89b568ad..3608f41e369 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -236,8 +236,7 @@ macro(setup_liblinks
${OPENGL_glu_LIBRARY}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
- ${FREETYPE_LIBRARY}
- ${LAPACK_LIBRARIES})
+ ${FREETYPE_LIBRARY})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -346,7 +345,9 @@ macro(setup_liblinks
if(WITH_INPUT_NDOF)
target_link_libraries(${target} ${NDOF_LIBRARIES})
endif()
-
+ if(WITH_MOD_CLOTH_ELTOPO)
+ target_link_libraries(${target} ${LAPACK_LIBRARIES})
+ endif()
if(WIN32 AND NOT UNIX)
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
endif()
@@ -452,6 +453,12 @@ macro(remove_strict_flags)
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
endif()
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ remove_cc_flag("-Wunused-parameter")
+ remove_cc_flag("-Wunused-variable")
+ remove_cc_flag("-Werror")
+ endif()
+
if(MSVC)
# TODO
endif()
diff --git a/intern/guardedalloc/cpp/mallocn.cpp b/intern/guardedalloc/cpp/mallocn.cpp
index 21f5e323cf2..da77f0e1c83 100644
--- a/intern/guardedalloc/cpp/mallocn.cpp
+++ b/intern/guardedalloc/cpp/mallocn.cpp
@@ -29,33 +29,33 @@
#include "../MEM_guardedalloc.h"
/* not default but can be used when needing to set a string */
-void *operator new(size_t size, const char *str)
+void *operator new(size_t size, const char *str) throw(std::bad_alloc)
{
return MEM_mallocN(size, str);
}
-void *operator new[](size_t size, const char *str)
+void *operator new[](size_t size, const char *str) throw(std::bad_alloc)
{
return MEM_mallocN(size, str);
}
-void *operator new(size_t size)
+void *operator new(size_t size) throw(std::bad_alloc)
{
return MEM_mallocN(size, "C++/anonymous");
}
-void *operator new[](size_t size)
+void *operator new[](size_t size) throw(std::bad_alloc)
{
return MEM_mallocN(size, "C++/anonymous[]");
}
-void operator delete(void *p)
+void operator delete(void *p) throw()
{
/* delete NULL is valid in c++ */
if (p)
MEM_freeN(p);
}
-void operator delete[](void *p)
+void operator delete[](void *p) throw()
{
/* delete NULL is valid in c++ */
if (p)
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.h b/source/blender/compositor/intern/COM_MemoryProxy.h
index f02da215b5f..130c5f5057a 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.h
+++ b/source/blender/compositor/intern/COM_MemoryProxy.h
@@ -50,12 +50,12 @@ private:
/**
* @brief datatype of this MemoryProxy
*/
- DataType m_datatype;
+ /* DataType m_datatype; */ /* UNUSED */
/**
* @brief channel information of this buffer
*/
- ChannelInfo m_channelInfo[COM_NUMBER_OF_CHANNELS];
+ /* ChannelInfo m_channelInfo[COM_NUMBER_OF_CHANNELS]; */ /* UNUSED */
/**
* @brief the allocated memory
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index d1ddecc0df6..696c0748d69 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -27,8 +27,9 @@ extern "C" {
#include "RE_pipeline.h"
}
-BlurBaseOperation::BlurBaseOperation(DataType data_type=COM_DT_COLOR) : NodeOperation()
+BlurBaseOperation::BlurBaseOperation(DataType data_type) : NodeOperation()
{
+ /* data_type is almost always COM_DT_COLOR except for alpha-blur */
this->addInputSocket(data_type);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(data_type);
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.h b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
index 859df200020..5bc13736dda 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.h
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.h
@@ -32,7 +32,7 @@ class ChannelMatteOperation : public NodeOperation {
private:
SocketReader *m_inputImageProgram;
- int m_color_space; /* node->custom1 */
+ /* int m_color_space; */ /* node->custom1 */ /* UNUSED */ /* TODO ? */
int m_matte_channel; /* node->custom2 */
int m_limit_method; /* node->algorithm */
int m_limit_channel; /* node->channel */
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 9a783b461a0..6dbf53cba72 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -1346,7 +1346,7 @@ void UI_view2d_multi_grid_draw(View2D *v2d, float step, int level_size, int totl
glBegin(GL_LINES);
for (; start < v2d->cur.xmax; start += lstep, ++i) {
- if (i == 0 || (level < totlevels-1 && i % level_size == 0))
+ if (i == 0 || (level < totlevels - 1 && i % level_size == 0))
continue;
glVertex2f(start, v2d->cur.ymin);
glVertex2f(start, v2d->cur.ymax);
@@ -1356,14 +1356,14 @@ void UI_view2d_multi_grid_draw(View2D *v2d, float step, int level_size, int totl
start = i * lstep;
for (; start < v2d->cur.ymax; start += lstep, ++i) {
- if (i == 0 || (level < totlevels-1 && i % level_size == 0))
+ if (i == 0 || (level < totlevels - 1 && i % level_size == 0))
continue;
glVertex2f(v2d->cur.xmin, start);
glVertex2f(v2d->cur.xmax, start);
}
/* X and Y axis */
- UI_ThemeColorShade(TH_BACK, offset-8);
+ UI_ThemeColorShade(TH_BACK, offset - 8);
glVertex2f(0.0f, v2d->cur.ymin);
glVertex2f(0.0f, v2d->cur.ymax);
glVertex2f(v2d->cur.xmin, 0.0f);
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 9cab08cbc34..32ca1bca107 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -51,6 +51,13 @@
# define __func__ __FUNCTION__
#endif
+/* copied from BKE_utildefines.h ugh */
+#ifdef __GNUC__
+# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
+#else
+# define UNUSED(x) x
+#endif
+
/* Replace if different */
#define TMP_EXT ".tmp"
@@ -310,7 +317,7 @@ static void rna_print_data_get(FILE *f, PropertyDefRNA *dp)
fprintf(f, " %s *data= (%s*)(ptr->data);\n", dp->dnastructname, dp->dnastructname);
}
-static void rna_print_id_get(FILE *f, PropertyDefRNA *dp)
+static void rna_print_id_get(FILE *f, PropertyDefRNA *UNUSED(dp))
{
fprintf(f, " ID *id= ptr->id.data;\n");
}
@@ -1179,7 +1186,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
return func;
}
-static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp,
+static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp),
const char *manualfunc)
{
char *func, *getfunc;
@@ -1206,7 +1213,7 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p
return func;
}
-static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp,
+static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *UNUSED(dp),
const char *manualfunc)
{
char *func;
@@ -2006,7 +2013,7 @@ static void rna_generate_blender(BlenderRNA *brna, FILE *f)
fprintf(f, "};\n\n");
}
-static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna, FILE *f)
+static void rna_generate_property_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)
{
PropertyRNA *prop;
StructRNA *base;
@@ -2029,7 +2036,7 @@ static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna,
fprintf(f, "\n");
}
-static void rna_generate_parameter_prototypes(BlenderRNA *brna, StructRNA *srna, FunctionRNA *func, FILE *f)
+static void rna_generate_parameter_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FunctionRNA *func, FILE *f)
{
PropertyRNA *parm;
@@ -2068,7 +2075,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna,
fprintf(f, "\n");
}
-static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA *srna, FunctionDefRNA *dfunc, FILE *f)
+static void rna_generate_static_parameter_prototypes(BlenderRNA *UNUSED(brna), StructRNA *srna, FunctionDefRNA *dfunc, FILE *f)
{
FunctionRNA *func;
PropertyDefRNA *dparm;
@@ -2483,7 +2490,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
}
-static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
+static void rna_generate_struct(BlenderRNA *UNUSED(brna), StructRNA *srna, FILE *f)
{
FunctionRNA *func;
FunctionDefRNA *dfunc;
@@ -2761,7 +2768,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
}
}
-static void rna_generate_header(BlenderRNA *brna, FILE *f)
+static void rna_generate_header(BlenderRNA *UNUSED(brna), FILE *f)
{
StructDefRNA *ds;
PropertyDefRNA *dp;
@@ -2929,7 +2936,7 @@ static const char *cpp_classes = ""
"};\n"
"\n";
-static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
+static void rna_generate_header_cpp(BlenderRNA *UNUSED(brna), FILE *f)
{
StructDefRNA *ds;
PropertyDefRNA *dp;
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 02d8cbef4a3..7a92ac56006 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -497,6 +497,9 @@ void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext)
ext->free(ext->data); /* decref's the PyObject that the srna owns */
RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */
RNA_struct_py_type_set(srna, NULL); /* NULL the srna's value so RNA_struct_free wont complain of a leak */
+#else
+ (void)srna;
+ (void)ext;
#endif
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 072df099cea..7a2f0736e98 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -736,7 +736,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
}
static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), int *free)
+ PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
ID *id = ptr->id.data;
if (id && GS(id->name) == ID_SCE) {
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index cce0612bd68..00e8ed5289f 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -231,7 +231,7 @@ static void rna_Sensor_level_set(struct PointerRNA *ptr, int value)
sens->tap = 0;
}
-static void rna_Sensor_Armature_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_Sensor_Armature_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
bSensor *sens = (bSensor *)ptr->data;
bArmatureSensor *as = sens->data;
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 3a534cd22b4..6c54b7c2cf3 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -99,7 +99,7 @@ static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int start
return seq;
}
-static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, ReportList *reports,
+static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed,
const char *name, MovieClip *clip, int channel,
int start_frame)
{
@@ -118,7 +118,7 @@ static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed, ReportList *reports
return seq;
}
-static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed, ReportList *reports,
+static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed,
const char *name, Mask *mask, int channel,
int start_frame)
{
@@ -137,7 +137,7 @@ static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed, ReportList *reports
return seq;
}
-static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed, ReportList *reports,
+static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed,
const char *name, Scene *sce_seq, int channel,
int start_frame)
{
@@ -455,7 +455,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
- RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new movie clip sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -472,7 +472,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "new_mask", "rna_Sequences_new_mask");
- RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new movie clip sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -489,7 +489,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
- RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new scene sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
RNA_def_property_flag(parm, PROP_REQUIRED);
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h
index fab0bb94618..9318e1758a6 100644
--- a/source/blender/render/intern/raytrace/bvh.h
+++ b/source/blender/render/intern/raytrace/bvh.h
@@ -75,7 +75,7 @@ inline int test_bb_group4(__m128 *bb_group, const Isect *isec)
* Based on Tactical Optimization of Ray/Box Intersection, by Graham Fyffe
* [http://tog.acm.org/resources/RTNews/html/rtnv21n1.html#art9]
*/
-static int rayobject_bb_intersect_test(const Isect *isec, const float *_bb)
+static inline int rayobject_bb_intersect_test(const Isect *isec, const float *_bb)
{
const float *bb = _bb;