[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53887] branches/soc-2008-mxcurioni/source /blender/freestyle/intern: A patch set from Bastien Montagne (thanks!) for silencing build warnings (from gcc 4.7),
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Fri Jan 18 03:13:40 CET 2013
Revision: 53887
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53887
Author: kjym3
Date: 2013-01-18 02:13:36 +0000 (Fri, 18 Jan 2013)
Log Message:
-----------
A patch set from Bastien Montagne (thanks!) for silencing build warnings (from gcc 4.7),
mostly by commenting out unused variables, or using the BLI's SET_UINT_IN_POINTER macro.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/application/AppView.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/application/AppView.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/application/AppView.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/application/AppView.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -105,10 +105,10 @@
AppView::~AppView()
{
- int ref = _RootNode.destroy();
+ /*int ref =*/ /* UNUSED */ _RootNode.destroy();
_Light.destroy();
- ref = _p2DNode.destroy();
+ /*ref =*/ /* UNUSED */ _p2DNode.destroy();
}
real AppView::distanceToSceneCenter()
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -106,7 +106,7 @@
int BlenderFileLoader::countClippedFaces(float v1[3], float v2[3], float v3[3], int clip[3])
{
float *v[3];
- int numClipped, sum, numTris;
+ int numClipped, sum, numTris = 0;
v[0] = v1;
v[1] = v2;
@@ -356,7 +356,7 @@
// We parse vlak nodes and count the number of faces after the clipping by
// the near and far view planes is applied (Note: mesh vertices are in the
// camera coordinate system).
- VlakRen *vlr;
+ VlakRen *vlr = NULL;
unsigned numFaces = 0;
float v1[3], v2[3], v3[3], v4[3];
float n1[3], n2[3], n3[3], n4[3], facenormal[3];
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -117,6 +117,10 @@
freestyle_scene->r.im_format.imtype = R_IMF_IMTYPE_PNG;
BKE_scene_disable_color_management(freestyle_scene);
+ if (G.debug & G_DEBUG_FREESTYLE) {
+ printf("%s: %d threads\n", __func__, freestyle_scene->r.threads);
+ }
+
// Render layer
SceneRenderLayer *srl = (SceneRenderLayer *)freestyle_scene->r.layers.first;
srl->layflag = SCE_LAY_SOLID | SCE_LAY_ZTRA;
@@ -221,7 +225,7 @@
vector<Strip*>& strips = iStrokeRep->getStrips();
Strip::vertex_container::iterator v[3];
StrokeVertexRep *svRep[3];
- Vec3r color[3];
+ /* Vec3r color[3]; */ /* UNUSED */
unsigned int vertex_index, edge_index, loop_index;
Vec2r p;
@@ -481,6 +485,8 @@
#if 0
BKE_scene_base_deselect_all(scene);
BKE_scene_base_select(scene, base);
+#else
+ (void)base;
#endif
ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h 2013-01-18 02:13:36 UTC (rev 53887)
@@ -25,8 +25,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef __BLENDERSTROKERENDERER_H__
-#define __BLENDERSTROKERENDERER_H__
+#ifndef __BLENDER_STROKE_RENDERER_H__
+#define __BLENDER_STROKE_RENDERER_H__
/** \file blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h
* \ingroup freestyle
@@ -73,4 +73,4 @@
float get_stroke_vertex_z(void) const;
};
-#endif // __BLENDERSTROKERENDERER_H__
+#endif // __BLENDER_STROKE_RENDERER_H__
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/geometry/Grid.h 2013-01-18 02:13:36 UTC (rev 53887)
@@ -37,6 +37,9 @@
#include <cstring> // for memset
#include <float.h>
+#ifndef _MSC_VER
+#include <stdint.h> // For SET_UINT_IN_POINTER, i.e. uintptr_t.
+#endif
#include <vector>
#include "Geom.h"
@@ -45,6 +48,10 @@
#include "../system/FreestyleConfig.h"
+extern "C" {
+ #include "BLI_utildefines.h"
+}
+
using namespace std;
using namespace Geometry;
@@ -325,8 +332,8 @@
visitor.discoverCell(current_cell);
OccludersSet& occluders = current_cell->getOccluders(); // FIXME: I had forgotten the ref &
for (OccludersSet::iterator it = occluders.begin(); it != occluders.end(); it++) {
- if ((unsigned long)(*it)->userdata2 != _timestamp) {
- (*it)->userdata2 = (void*)_timestamp;
+ if (GET_UINT_FROM_POINTER((*it)->userdata2) != _timestamp) {
+ (*it)->userdata2 = SET_UINT_IN_POINTER(_timestamp);
visitor.examineOccluder(*it);
}
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -96,14 +96,14 @@
void NodeGroup::DetachChild(Node *iChild)
{
- int found = 0;
+ /* int found = 0; */ /* UNUSED */
vector<Node*>::iterator node;
for (node = _Children.begin(); node != _Children.end(); ++node) {
if ((*node) == iChild) {
(*node)->release();
_Children.erase(node);
- found = 1;
+ /* found = 1; */ /* UNUSED */
break;
}
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -124,7 +124,7 @@
int GetCompleteViewMapDensityF1D::operator()(Interface1D& inter)
{
//soc unsigned size;
- Id id = inter.getId();
+ /* Id id = inter.getId(); */ /* UNUSED */
result = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration);
return 0;
}
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -226,10 +226,10 @@
int ThicknessVariationPatternShader::shade(Stroke& stroke) const
{
StrokeInternal::StrokeVertexIterator v, vend;
- float *array = 0;
- int size;
+ float *array = NULL;
+ /* int size; */ /* UNUSED */
array = _aThickness;
- size = _size;
+ /* size = _size; */ /* UNUSED */
int vert_size = stroke.strokeVerticesSize();
int sig = 0;
unsigned index;
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/StrokeRep.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -292,10 +292,10 @@
_vertices.push_back(new StrokeVertexRep(sv->getPoint() + thicknessLast[1] * stripDirLast));
++i;
_vertices.push_back(new StrokeVertexRep(sv->getPoint() - thicknessLast[0] * stripDirLast));
- int n = i;
++i;
#if 0
+ int n = i - 1;
// check whether the orientation of the extremity was user defined
userDir = _stroke->getEndingOrientation();
if (userDir != Vec2r(0, 0)) {
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -67,7 +67,7 @@
// Reinit structures
Init(oVShape);
- ViewEdge *vedge;
+ /* ViewEdge *vedge; */ /* UNUSED */
// Let us build the smooth stuff
//----------------------------------------
// We parse all faces to find the ones that contain smooth edges
@@ -87,7 +87,7 @@
continue;
// here we know that we're dealing with a face layer that has not been processed yet and that contains
// a smooth edge.
- vedge = BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
+ /* vedge =*/ /* UNUSED */ BuildSmoothViewEdge(OWXFaceLayer(*sl, true));
}
}
@@ -225,7 +225,7 @@
// Find first edge:
OWXEdge firstWEdge = iWEdge;
- OWXEdge previousWEdge = firstWEdge;
+ /* OWXEdge previousWEdge = firstWEdge; */ /* UNUSED */
OWXEdge currentWEdge = firstWEdge;
list<OWXEdge> edgesChain;
#if 0 /* TK 02-Sep-2012 Experimental fix for incorrect view edge visibility. */
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp 2013-01-17 22:51:54 UTC (rev 53886)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp 2013-01-18 02:13:36 UTC (rev 53887)
@@ -573,6 +573,8 @@
if (_global.debug & G_DEBUG_FREESTYLE) {
cout << "\tConclusion: QI = " << maxIndex << ", " << (*ve)->occluders_size() << " occluders." << endl;
}
+ #else
+ (void)maxIndex;
#endif
// occludee --
if (!wFaces.empty()) {
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list