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-11-04 01:44:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-04 01:44:39 +0300
commitdba1904f657ab9b90aaea3ceed6dad97ec4ad951 (patch)
treeff8dba823a4b34766d4d88d224221877cd311daa
parentce3b49742decf64b3cb600dd2091feac07330b7b (diff)
bugfix [#24518] Blender wont compile with -Wall -Werror and COLLADA support
fix included in report from Martijn Berger (mberger) made some small changes. - use ints rather then unsigned long for printing, values are not likely to be very large. - CMake remove strict flags from collada build dir since I had warnings in the collada headers. - added xml2 to collada libraries else I couldnt get collada building.
-rw-r--r--CMakeLists.txt2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/collada/AnimationImporter.cpp14
-rw-r--r--source/blender/collada/CMakeLists.txt2
-rw-r--r--source/blender/collada/DocumentExporter.cpp2
-rw-r--r--source/blender/collada/DocumentImporter.cpp2
-rw-r--r--source/blender/collada/MeshImporter.h4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
8 files changed, 16 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8673c926f1..e91d93b92eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -287,7 +287,7 @@ IF(UNIX AND NOT APPLE)
IF (WITH_OPENCOLLADA)
SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
- SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer)
+ SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
SET(OPENCOLLADA_INC ${OPENCOLLADA})
SET(PCRE /usr CACHE FILEPATH "PCRE Directory")
SET(PCRE_LIBPATH ${PCRE}/lib)
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a9fd383114f..4f9954b4156 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8196,7 +8196,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
if(sce->r.mode & R_PANORAMA) {
- /* all these checks to ensure saved files with cvs version keep working... */
+ /* all these checks to ensure saved files with svn version keep working... */
if(sce->r.xsch < sce->r.ysch) {
Object *obc= newlibadr(fd, lib, sce->camera);
if(obc && obc->type==OB_CAMERA) {
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index a79bf3ebaa7..c7267bd46f8 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -131,7 +131,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
}
break;
default:
- fprintf(stderr, "Output dimension of %d is not yet supported (animation id = %s)\n", dim, curve->getOriginalId().c_str());
+ fprintf(stderr, "Output dimension of %d is not yet supported (animation id = %s)\n", (int)dim, curve->getOriginalId().c_str());
}
for (std::vector<FCurve*>::iterator it = fcurves.begin(); it != fcurves.end(); it++)
@@ -221,7 +221,7 @@ AnimationImporter::~AnimationImporter()
free_fcurve(*it);
if (unused_curves.size())
- fprintf(stderr, "removed %u unused curves\n", unused_curves.size());
+ fprintf(stderr, "removed %d unused curves\n", (int)unused_curves.size());
}
bool AnimationImporter::write_animation(const COLLADAFW::Animation* anim)
@@ -564,7 +564,7 @@ Object *AnimationImporter::translate_animation(COLLADAFW::Node *node,
}
}
else {
- fprintf(stderr, "expected %d curves, got %u\n", xyz ? 3 : 1, curves.size());
+ fprintf(stderr, "expected %d curves, got %d\n", xyz ? 3 : 1, (int)curves.size());
}
}
}
@@ -902,7 +902,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
if (type == COLLADAFW::Transformation::ROTATE) {
if (curves.size() != 1) {
- fprintf(stderr, "expected 1 curve, got %u\n", curves.size());
+ fprintf(stderr, "expected 1 curve, got %d\n", (int)curves.size());
return false;
}
@@ -924,9 +924,9 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
if ((!is_xyz && curves.size() != 1) || (is_xyz && curves.size() != 3)) {
if (is_xyz)
- fprintf(stderr, "%s: expected 3 curves, got %u\n", path, curves.size());
+ fprintf(stderr, "%s: expected 3 curves, got %d\n", path, (int)curves.size());
else
- fprintf(stderr, "%s: expected 1 curve, got %u\n", path, curves.size());
+ fprintf(stderr, "%s: expected 1 curve, got %d\n", path, (int)curves.size());
return false;
}
@@ -953,7 +953,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
else if (type == COLLADAFW::Transformation::MATRIX) {
// for now, of matrix animation, support only the case when all values are packed into one animation
if (curves.size() != 16) {
- fprintf(stderr, "%s: expected 16 curves, got %u\n", path, curves.size());
+ fprintf(stderr, "%s: expected 16 curves, got %d\n", path, (int)curves.size());
return false;
}
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index bcc407b6b68..98d9780a92e 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -24,6 +24,8 @@
#
# ***** END GPL LICENSE BLOCK *****
+REMOVE_STRICT_FLAGS()
+
SET(INC
.
../blenlib
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 9062bd4ba9f..66a0b0cbdd4 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -904,7 +904,7 @@ protected:
void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename)
{
PointerRNA sceneptr, unit_settings;
- PropertyRNA *system, *scale;
+ PropertyRNA *system; /* unused , *scale; */
clear_global_id_map();
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index bc5653c8c45..86609d11c02 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -219,7 +219,7 @@ public:
if (libnode_ob.size()) {
Scene *sce = CTX_data_scene(mContext);
- fprintf(stderr, "got %u library nodes to free\n", libnode_ob.size());
+ fprintf(stderr, "got %d library nodes to free\n", (int)libnode_ob.size());
// free all library_nodes
std::vector<Object*>::iterator it;
for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) {
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h
index 055c4798855..c5ab6e94561 100644
--- a/source/blender/collada/MeshImporter.h
+++ b/source/blender/collada/MeshImporter.h
@@ -72,6 +72,8 @@ class MeshImporter : public MeshImporterBase
{
private:
+ UnitConverter *unitconverter;
+
Scene *scene;
ArmatureImporter *armature_importer;
@@ -120,8 +122,6 @@ private:
bool flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor, int count);
- UnitConverter *unitconverter;
-
public:
MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Scene *sce);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c6baf0e53be..fa300d51724 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1920,7 +1920,7 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
#include "../../collada/collada.h"
-static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
if(!RNA_property_is_set(op->ptr, "filepath")) {
char filepath[FILE_MAX];