wok diff inkscape/stuff/patches/0004-Fix_FTBFS_on_gcc-4.8.patch @ rev 17707

Up marlin: edit last patch (again)
author Yuri Pourre <yuripourre@gmail.com>
date Mon Mar 02 11:31:13 2015 -0300 (2015-03-02)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/inkscape/stuff/patches/0004-Fix_FTBFS_on_gcc-4.8.patch	Mon Mar 02 11:31:13 2015 -0300
     1.3 @@ -0,0 +1,77 @@
     1.4 +From: Mattia Rizzolo <mattia@mapreri.org>
     1.5 +Date: Tue, 8 Jul 2014 12:33:57 +0200
     1.6 +Subject: Fix_FTBFS_on_gcc-4.8
     1.7 +
     1.8 +Last-Update: 2014-07-02
     1.9 +
    1.10 +Signed-off-by: Matteo F. Vescovi <mfvescovi@gmail.com>
    1.11 +---
    1.12 + src/libavoid/vpsc.cpp        | 2 +-
    1.13 + src/libcola/straightener.cpp | 6 +++---
    1.14 + src/libcroco/cr-parser.c     | 2 +-
    1.15 + src/libvpsc/block.cpp        | 2 +-
    1.16 + 4 files changed, 6 insertions(+), 6 deletions(-)
    1.17 +
    1.18 +diff --git a/src/libavoid/vpsc.cpp b/src/libavoid/vpsc.cpp
    1.19 +index 19d3603..1646dda 100644
    1.20 +--- a/src/libavoid/vpsc.cpp
    1.21 ++++ b/src/libavoid/vpsc.cpp
    1.22 +@@ -422,7 +422,7 @@ Constraint* IncSolver::mostViolated(Constraints &l) {
    1.23 +     // downwards.  There is always at least 1 element in the
    1.24 +     // vector because of search.
    1.25 +     // TODO check this logic and add parens:
    1.26 +-    if((deletePoint != end) && ((minSlack < ZERO_UPPERBOUND) && !v->active || v->equality)) {
    1.27 ++    if((deletePoint != end) && (((minSlack < ZERO_UPPERBOUND) && !v->active) || v->equality)) {
    1.28 +         *deletePoint = l[l.size()-1];
    1.29 +         l.resize(l.size()-1);
    1.30 +     }
    1.31 +diff --git a/src/libcola/straightener.cpp b/src/libcola/straightener.cpp
    1.32 +index e237c03..7c73cb9 100644
    1.33 +--- a/src/libcola/straightener.cpp
    1.34 ++++ b/src/libcola/straightener.cpp
    1.35 +@@ -108,7 +108,7 @@ namespace straightener {
    1.36 +     int compare_events(const void *a, const void *b) {
    1.37 +         Event *ea=*(Event**)a;
    1.38 +         Event *eb=*(Event**)b;
    1.39 +-        if(ea->v!=NULL&&ea->v==eb->v||ea->e!=NULL&&ea->e==eb->e) {
    1.40 ++        if((ea->v!=NULL&&ea->v==eb->v)||(ea->e!=NULL&&ea->e==eb->e)) {
    1.41 +             // when comparing opening and closing from object
    1.42 +             // open must come first
    1.43 +             if(ea->type==Open) return -1;
    1.44 +@@ -263,8 +263,8 @@ namespace straightener {
    1.45 +                         // node is on an edge
    1.46 +                         Edge *edge=(*i)->edge;
    1.47 +                         if(!edge->isEnd(v->id)
    1.48 +-                                &&(l!=NULL&&!edge->isEnd(l->id)||l==NULL)
    1.49 +-                                &&(r!=NULL&&!edge->isEnd(r->id)||r==NULL)) {
    1.50 ++                                &&((l!=NULL&&!edge->isEnd(l->id))||l==NULL)
    1.51 ++                                &&((r!=NULL&&!edge->isEnd(r->id))||r==NULL)) {
    1.52 +                             if(lastNode!=NULL) {
    1.53 +                                 //printf("  Rule A: Constraint: v%d +g <= v%d\n",lastNode->id,(*i)->id);
    1.54 +                                 cs.push_back(createConstraint(lastNode,*i,dim));
    1.55 +diff --git a/src/libcroco/cr-parser.c b/src/libcroco/cr-parser.c
    1.56 +index 5b0a56f..a8e2de5 100644
    1.57 +--- a/src/libcroco/cr-parser.c
    1.58 ++++ b/src/libcroco/cr-parser.c
    1.59 +@@ -2408,7 +2408,7 @@ cr_parser_parse_stylesheet (CRParser * a_this)
    1.60 +                                                  import_string,
    1.61 +                                                  NULL, &location) ;
    1.62 + 
    1.63 +-                                        if ((PRIVATE (a_this)->sac_handler->resolve_import == TRUE)) {
    1.64 ++                                        if (PRIVATE (a_this)->sac_handler->resolve_import == TRUE) {
    1.65 +                                                 /*
    1.66 +                                                  *TODO: resolve the
    1.67 +                                                  *import rule.
    1.68 +diff --git a/src/libvpsc/block.cpp b/src/libvpsc/block.cpp
    1.69 +index 221df53..0bd662f 100644
    1.70 +--- a/src/libvpsc/block.cpp
    1.71 ++++ b/src/libvpsc/block.cpp
    1.72 +@@ -72,7 +72,7 @@ void Block::setUpConstraintHeap(PairingHeap<Constraint*>* &h,bool in) {
    1.73 + 		for (Cit j=cs->begin();j!=cs->end();++j) {
    1.74 + 			Constraint *c=*j;
    1.75 + 			c->timeStamp=blockTimeCtr;
    1.76 +-			if (c->left->block != this && in || c->right->block != this && !in) {
    1.77 ++			if ((c->left->block != this && in) || (c->right->block != this && !in)) {
    1.78 + 				h->insert(c);
    1.79 + 			}
    1.80 + 		}