summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-20 22:55:55 +0000
committerCampbell Barton <ideasman42@gmail.com>2012-11-20 22:55:55 +0000
commitd463240d8fd961d45b47ba96e0d93c37e1719da7 (patch)
tree25be35855525cba941ff28f0d1ea7684dc1a258c /src
parentFix for #970355, radial gradient using object bounding box. (diff)
downloadinkscape-d463240d8fd961d45b47ba96e0d93c37e1719da7.tar.gz
inkscape-d463240d8fd961d45b47ba96e0d93c37e1719da7.zip
code cleanup: quiet warnings with gcc.
(bzr r11888)
Diffstat (limited to 'src')
-rw-r--r--src/libavoid/makepath.cpp2
-rw-r--r--src/libavoid/orthogonal.cpp4
-rw-r--r--src/libcola/connected_components.cpp2
-rw-r--r--src/libcola/shortest_paths.cpp4
-rw-r--r--src/libcola/straightener.cpp2
-rw-r--r--src/libnrtype/FontFactory.cpp4
-rw-r--r--src/libvpsc/csolve_VPSC.h2
-rw-r--r--src/libvpsc/generate-constraints.cpp6
-rw-r--r--src/libvpsc/remove_rectangle_overlap.cpp1
-rw-r--r--src/livarot/PathSimplify.cpp10
-rw-r--r--src/livarot/PathStroke.cpp4
-rw-r--r--src/livarot/ShapeMisc.cpp4
-rw-r--r--src/svg/itos.cpp2
-rw-r--r--src/svg/round.cpp1
-rw-r--r--src/util/expression-evaluator.cpp2
15 files changed, 28 insertions, 22 deletions
diff --git a/src/libavoid/makepath.cpp b/src/libavoid/makepath.cpp
index 4e15dbca9..774e0d7f5 100644
--- a/src/libavoid/makepath.cpp
+++ b/src/libavoid/makepath.cpp
@@ -82,7 +82,7 @@ class ANode
// it back into a heap) when getting the next node to examine. This way we
// get better complexity -- logarithmic pushs and pops to the heap.
//
-bool operator<(const ANode &a, const ANode &b)
+static bool operator<(const ANode &a, const ANode &b)
{
if (a.f != b.f)
{
diff --git a/src/libavoid/orthogonal.cpp b/src/libavoid/orthogonal.cpp
index e0a30b246..772fc9668 100644
--- a/src/libavoid/orthogonal.cpp
+++ b/src/libavoid/orthogonal.cpp
@@ -204,7 +204,7 @@ class ShiftSegment
};
typedef std::list<ShiftSegment> ShiftSegmentList;
-bool cmpShiftSegment(const ShiftSegment& u, const ShiftSegment& v)
+static bool cmpShiftSegment(const ShiftSegment& u, const ShiftSegment& v)
{
return u < v;
}
@@ -488,7 +488,7 @@ Event **events;
// Used for quicksort. Must return <0, 0, or >0.
-int compare_events(const void *a, const void *b)
+static int compare_events(const void *a, const void *b)
{
Event *ea = *(Event**) a;
Event *eb = *(Event**) b;
diff --git a/src/libcola/connected_components.cpp b/src/libcola/connected_components.cpp
index 0cf6ee45a..1afec55b4 100644
--- a/src/libcola/connected_components.cpp
+++ b/src/libcola/connected_components.cpp
@@ -39,7 +39,7 @@ namespace cola {
Rectangle* r;
};
// Depth first search traversal of graph to find connected component
- void dfs(Node* v,
+ static void dfs(Node* v,
list<Node*>& remaining,
Component* component,
map<unsigned,pair<Component*,unsigned> > &cmap) {
diff --git a/src/libcola/shortest_paths.cpp b/src/libcola/shortest_paths.cpp
index ebc2c93de..514721fb5 100644
--- a/src/libcola/shortest_paths.cpp
+++ b/src/libcola/shortest_paths.cpp
@@ -33,7 +33,7 @@ void floyd_warshall(
}
}
}
-void dijkstra_init(Node* vs, vector<Edge>& es, double* eweights) {
+static void dijkstra_init(Node* vs, vector<Edge>& es, double* eweights) {
for(unsigned i=0;i<es.size();i++) {
unsigned u=es[i].first, v=es[i].second;
vs[u].neighbours.push_back(&vs[v]);
@@ -42,7 +42,7 @@ void dijkstra_init(Node* vs, vector<Edge>& es, double* eweights) {
vs[v].nweights.push_back(eweights[i]);
}
}
-void dijkstra(
+static void dijkstra(
unsigned s,
unsigned n,
Node* vs,
diff --git a/src/libcola/straightener.cpp b/src/libcola/straightener.cpp
index 0ecd82faa..650f41aac 100644
--- a/src/libcola/straightener.cpp
+++ b/src/libcola/straightener.cpp
@@ -109,7 +109,7 @@ namespace straightener {
Event(EventType t, Edge *e, double p) : type(t),v(NULL),e(e),pos(p) {};
};
Event **events;
- int compare_events(const void *a, const void *b) {
+ static int compare_events(const void *a, const void *b) {
Event *ea=*(Event**)a;
Event *eb=*(Event**)b;
if((ea->v!=NULL&&ea->v==eb->v)||(ea->e!=NULL&&ea->e==eb->e)) {
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 8de9d4795..76a3df0e8 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -276,7 +276,7 @@ family_name_compare(char const *a, char const *b)
#endif
}
-void noop(...) {}
+static void noop(...) {}
//#define PANGO_DEBUG g_print
#define PANGO_DEBUG noop
@@ -285,7 +285,7 @@ void noop(...) {}
///////////////////// FontFactory
#ifndef USE_PANGO_WIN32
// the substitute function to tell fontconfig to enforce outline fonts
-void FactorySubstituteFunc(FcPattern *pattern,gpointer /*data*/)
+static void FactorySubstituteFunc(FcPattern *pattern,gpointer /*data*/)
{
FcPatternAddBool(pattern, "FC_OUTLINE",FcTrue);
//char *fam = NULL;
diff --git a/src/libvpsc/csolve_VPSC.h b/src/libvpsc/csolve_VPSC.h
index b0d01e763..edfd16657 100644
--- a/src/libvpsc/csolve_VPSC.h
+++ b/src/libvpsc/csolve_VPSC.h
@@ -60,7 +60,9 @@ int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
void satisfyVPSC(Solver*);
+void deleteVPSC(Solver*);
void solveVPSC(Solver*);
+void splitIncVPSC(IncSolver*);
Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
void splitIncSolver(IncSolver*);
int getSplitCnt(IncSolver *vpsc);
diff --git a/src/libvpsc/generate-constraints.cpp b/src/libvpsc/generate-constraints.cpp
index 8dd2d9331..fabe5217f 100644
--- a/src/libvpsc/generate-constraints.cpp
+++ b/src/libvpsc/generate-constraints.cpp
@@ -105,7 +105,7 @@ bool CmpNodePos::operator() (const Node* u, const Node* v) const {
*/
}
-NodeSet* getLeftNeighbours(NodeSet &scanline,Node *v) {
+static NodeSet* getLeftNeighbours(NodeSet &scanline,Node *v) {
NodeSet *leftv = new NodeSet;
NodeSet::iterator i=scanline.find(v);
while(i--!=scanline.begin()) {
@@ -120,7 +120,7 @@ NodeSet* getLeftNeighbours(NodeSet &scanline,Node *v) {
}
return leftv;
}
-NodeSet* getRightNeighbours(NodeSet &scanline,Node *v) {
+static NodeSet* getRightNeighbours(NodeSet &scanline,Node *v) {
NodeSet *rightv = new NodeSet;
NodeSet::iterator i=scanline.find(v);
for(++i;i!=scanline.end(); ++i) {
@@ -144,7 +144,7 @@ struct Event {
Event(EventType t, Node *v, double p) : type(t),v(v),pos(p) {};
};
Event **events;
-int compare_events(const void *a, const void *b) {
+static int compare_events(const void *a, const void *b) {
Event *ea=*(Event**)a;
Event *eb=*(Event**)b;
if(ea->v->r==eb->v->r) {
diff --git a/src/libvpsc/remove_rectangle_overlap.cpp b/src/libvpsc/remove_rectangle_overlap.cpp
index 381759f3c..d667ffb1e 100644
--- a/src/libvpsc/remove_rectangle_overlap.cpp
+++ b/src/libvpsc/remove_rectangle_overlap.cpp
@@ -15,6 +15,7 @@
#include "solve_VPSC.h"
#include "variable.h"
#include "constraint.h"
+#include "remove_rectangle_overlap.h" /* own include */
#ifdef RECTANGLE_OVERLAP_LOGGING
#include <fstream>
#include "blocks.h"
diff --git a/src/livarot/PathSimplify.cpp b/src/livarot/PathSimplify.cpp
index d6e916197..d9f609e87 100644
--- a/src/livarot/PathSimplify.cpp
+++ b/src/livarot/PathSimplify.cpp
@@ -70,10 +70,10 @@ void Path::Simplify(double treshhold)
// dichomtomic method to get distance to curve approximation
// a real polynomial solver would get the minimum more efficiently, but since the polynom
// would likely be of degree >= 5, that would imply using some generic solver, liek using the sturm metod
-double RecDistanceToCubic(Geom::Point const &iS, Geom::Point const &isD,
- Geom::Point const &iE, Geom::Point const &ieD,
- Geom::Point &pt, double current, int lev, double st, double et)
-{
+static double RecDistanceToCubic(Geom::Point const &iS, Geom::Point const &isD,
+ Geom::Point const &iE, Geom::Point const &ieD,
+ Geom::Point &pt, double current, int lev, double st, double et)
+{
if ( lev <= 0 ) {
return current;
}
@@ -116,7 +116,7 @@ double RecDistanceToCubic(Geom::Point const &iS, Geom::Point const &isD,
}
-double DistanceToCubic(Geom::Point const &start, PathDescrCubicTo res, Geom::Point &pt)
+static double DistanceToCubic(Geom::Point const &start, PathDescrCubicTo res, Geom::Point &pt)
{
Geom::Point const sp = pt - start;
Geom::Point const ep = pt - res.p;
diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp
index 93280d794..cdd5cae6d 100644
--- a/src/livarot/PathStroke.cpp
+++ b/src/livarot/PathStroke.cpp
@@ -20,7 +20,7 @@
*/
// until i find something better
-Geom::Point StrokeNormalize(const Geom::Point value) {
+static Geom::Point StrokeNormalize(const Geom::Point value) {
double length = L2(value);
if ( length < 0.0000001 ) {
return Geom::Point(0, 0);
@@ -30,7 +30,7 @@ Geom::Point StrokeNormalize(const Geom::Point value) {
}
// faster version if length is known
-Geom::Point StrokeNormalize(const Geom::Point value, double length) {
+static Geom::Point StrokeNormalize(const Geom::Point value, double length) {
if ( length < 0.0000001 ) {
return Geom::Point(0, 0);
} else {
diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp
index 7b170e8a0..a7e5a6cdc 100644
--- a/src/livarot/ShapeMisc.cpp
+++ b/src/livarot/ShapeMisc.cpp
@@ -406,7 +406,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int wildPath,in
if (startBord >= 0)
{
// parcours en profondeur pour mettre les leF et riF a leurs valeurs
- swdData[startBord].misc = (void *) (1+nbNest);
+ swdData[startBord].misc = (void *)(intptr_t)(1 + nbNest);
//printf("part de %d\n",startBord);
int curBord = startBord;
bool back = false;
@@ -507,7 +507,7 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int wildPath,in
startBord=nb;
}
}
- swdData[nb].misc = (void *) (1+nbNest);
+ swdData[nb].misc = (void *)(intptr_t)(1 + nbNest);
swdData[nb].ind = searchInd++;
swdData[nb].precParc = curBord;
swdData[curBord].suivParc = nb;
diff --git a/src/svg/itos.cpp b/src/svg/itos.cpp
index ff7ca516c..78726d068 100644
--- a/src/svg/itos.cpp
+++ b/src/svg/itos.cpp
@@ -18,6 +18,8 @@
#include <string> // for string
#include <cstring>
+#include "../io/ftos.h" /* own include */ /* note - why in different dirs? */
+
using std::string;
string itos(int n)
diff --git a/src/svg/round.cpp b/src/svg/round.cpp
index 9e7b91e4e..0a4ca9d05 100644
--- a/src/svg/round.cpp
+++ b/src/svg/round.cpp
@@ -26,6 +26,7 @@
// on the average.
///////////////////////////////////////////////////////////////////////
#include <math.h>
+#include "../io/ftos.h" /* own include */ /* note - why in different dirs? */
double rround(double x)
{
diff --git a/src/util/expression-evaluator.cpp b/src/util/expression-evaluator.cpp
index 37e9d6cc1..3e1bab6bc 100644
--- a/src/util/expression-evaluator.cpp
+++ b/src/util/expression-evaluator.cpp
@@ -75,7 +75,7 @@ typedef struct
/** Unit Resolver...
*/
-bool unitresolverproc (const gchar* identifier, GimpEevlQuantity *result, Unit* unit)
+static bool unitresolverproc (const gchar* identifier, GimpEevlQuantity *result, Unit* unit)
{
static UnitTable unit_table;