[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32862] trunk/blender: bugfix [#24518] Blender wont compile with -Wall -Werror and COLLADA support
Campbell Barton
ideasman42 at gmail.com
Wed Nov 3 23:44:39 CET 2010
Revision: 32862
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32862
Author: campbellbarton
Date: 2010-11-03 23:44:39 +0100 (Wed, 03 Nov 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/collada/AnimationImporter.cpp
trunk/blender/source/blender/collada/CMakeLists.txt
trunk/blender/source/blender/collada/DocumentExporter.cpp
trunk/blender/source/blender/collada/DocumentImporter.cpp
trunk/blender/source/blender/collada/MeshImporter.h
trunk/blender/source/blender/windowmanager/intern/wm_operators.c
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/CMakeLists.txt 2010-11-03 22:44:39 UTC (rev 32862)
@@ -287,7 +287,7 @@
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)
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-11-03 22:44:39 UTC (rev 32862)
@@ -8196,7 +8196,7 @@
}
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) {
Modified: trunk/blender/source/blender/collada/AnimationImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/AnimationImporter.cpp 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/collada/AnimationImporter.cpp 2010-11-03 22:44:39 UTC (rev 32862)
@@ -131,7 +131,7 @@
}
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 @@
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 @@
}
}
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 @@
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 @@
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 @@
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;
}
Modified: trunk/blender/source/blender/collada/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/collada/CMakeLists.txt 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/collada/CMakeLists.txt 2010-11-03 22:44:39 UTC (rev 32862)
@@ -24,6 +24,8 @@
#
# ***** END GPL LICENSE BLOCK *****
+REMOVE_STRICT_FLAGS()
+
SET(INC
.
../blenlib
Modified: trunk/blender/source/blender/collada/DocumentExporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentExporter.cpp 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/collada/DocumentExporter.cpp 2010-11-03 22:44:39 UTC (rev 32862)
@@ -904,7 +904,7 @@
void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename)
{
PointerRNA sceneptr, unit_settings;
- PropertyRNA *system, *scale;
+ PropertyRNA *system; /* unused , *scale; */
clear_global_id_map();
Modified: trunk/blender/source/blender/collada/DocumentImporter.cpp
===================================================================
--- trunk/blender/source/blender/collada/DocumentImporter.cpp 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/collada/DocumentImporter.cpp 2010-11-03 22:44:39 UTC (rev 32862)
@@ -219,7 +219,7 @@
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++) {
Modified: trunk/blender/source/blender/collada/MeshImporter.h
===================================================================
--- trunk/blender/source/blender/collada/MeshImporter.h 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/collada/MeshImporter.h 2010-11-03 22:44:39 UTC (rev 32862)
@@ -72,6 +72,8 @@
{
private:
+ UnitConverter *unitconverter;
+
Scene *scene;
ArmatureImporter *armature_importer;
@@ -120,8 +122,6 @@
bool flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor, int count);
- UnitConverter *unitconverter;
-
public:
MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Scene *sce);
Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2010-11-03 22:11:17 UTC (rev 32861)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2010-11-03 22:44:39 UTC (rev 32862)
@@ -1920,7 +1920,7 @@
#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];
More information about the Bf-blender-cvs
mailing list