aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-01-18 19:21:41 +0800
committerjbeich <jbeich@FreeBSD.org>2017-01-18 19:21:41 +0800
commitc35ab9c4159310636a454dc0d818b24d7d9b64ef (patch)
treef111e5912eb74995d515dfbcc158f7ce1df0abc8 /x11-toolkits
parent31f6421a853fd8b5c0a9405e77cf921566fae1c4 (diff)
downloadfreebsd-ports-gnome-c35ab9c4159310636a454dc0d818b24d7d9b64ef.tar.gz
freebsd-ports-gnome-c35ab9c4159310636a454dc0d818b24d7d9b64ef.tar.zst
freebsd-ports-gnome-c35ab9c4159310636a454dc0d818b24d7d9b64ef.zip
x11-toolkits/fltk-devel: unbreak with clang 4.0
src/Fl_Tree_Item.cxx:552:38: error: ordered comparison between pointer and zero ('Fl_Tree_Item *' and 'int') if ( from_parent->deparent(from) < 0 ) // deparent self from current parent ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ PR: 216046 Obtained from: upstream (branch-1.3) Approved by: portmgr blanket MFH: 2017Q1 (r431752 followup)
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/fltk-devel/Makefile2
-rw-r--r--x11-toolkits/fltk-devel/files/patch-src_Fl__Tree__Item.cxx16
2 files changed, 17 insertions, 1 deletions
diff --git a/x11-toolkits/fltk-devel/Makefile b/x11-toolkits/fltk-devel/Makefile
index 08e483628a8a..afeaf27730df 100644
--- a/x11-toolkits/fltk-devel/Makefile
+++ b/x11-toolkits/fltk-devel/Makefile
@@ -3,7 +3,7 @@
PORTNAME= fltk
DISTVERSION= 1.3.x-r${SNAPSHOT_VERS}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= x11-toolkits
MASTER_SITES= http://fltk.org/pub/${PORTNAME}/snapshots/
PKGNAMESUFFIX= -devel
diff --git a/x11-toolkits/fltk-devel/files/patch-src_Fl__Tree__Item.cxx b/x11-toolkits/fltk-devel/files/patch-src_Fl__Tree__Item.cxx
new file mode 100644
index 000000000000..08a2c4a364a9
--- /dev/null
+++ b/x11-toolkits/fltk-devel/files/patch-src_Fl__Tree__Item.cxx
@@ -0,0 +1,16 @@
+------------------------------------------------------------------------
+r10699 | greg.ercolano | 2015-04-13 16:55:27 +0000 (Mon, 13 Apr 2015) | 3 lines
+
+Fix return value test, as pointed out by Albrecht.
+
+--- src/Fl_Tree_Item.cxx.orig 2014-09-05 02:59:00 UTC
++++ src/Fl_Tree_Item.cxx
+@@ -549,7 +549,7 @@ int Fl_Tree_Item::move(Fl_Tree_Item *ite
+ } else { // different parent?
+ if ( to > to_parent->children() ) // try to prevent a reparent() error
+ return -4;
+- if ( from_parent->deparent(from) < 0 ) // deparent self from current parent
++ if ( from_parent->deparent(from) == NULL ) // deparent self from current parent
+ return -5;
+ if ( to_parent->reparent(this, to) < 0 ) { // reparent self to new parent at position 'to'
+ to_parent->reparent(this, 0); // failed? shouldn't happen, reparent at 0