diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-01-18 00:48:06 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-01-18 00:48:06 +0800 |
commit | af1fa51465f637615a49b1884d05712b6abba287 (patch) | |
tree | c9fd0519d29a7ed0224fe688304e62e579db1f68 /x11-toolkits | |
parent | 360c81eaf17d83c1a42fc54a898a4430fade2938 (diff) | |
download | freebsd-ports-gnome-af1fa51465f637615a49b1884d05712b6abba287.tar.gz freebsd-ports-gnome-af1fa51465f637615a49b1884d05712b6abba287.tar.zst freebsd-ports-gnome-af1fa51465f637615a49b1884d05712b6abba287.zip |
x11-toolkits/fltk: unbreak with clang 4.0
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 (changes behavior)
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/fltk/Makefile | 2 | ||||
-rw-r--r-- | x11-toolkits/fltk/files/patch-src_Fl__Tree__Item.cxx | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/x11-toolkits/fltk/Makefile b/x11-toolkits/fltk/Makefile index 982c66139c48..536f5961327b 100644 --- a/x11-toolkits/fltk/Makefile +++ b/x11-toolkits/fltk/Makefile @@ -3,7 +3,7 @@ PORTNAME= fltk PORTVERSION= 1.3.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-toolkits MASTER_SITES= http://fltk.org/pub/${PORTNAME}/${PORTVERSION}/ DISTNAME= ${PORTNAME}-${PORTVERSION}-source diff --git a/x11-toolkits/fltk/files/patch-src_Fl__Tree__Item.cxx b/x11-toolkits/fltk/files/patch-src_Fl__Tree__Item.cxx new file mode 100644 index 000000000000..08a2c4a364a9 --- /dev/null +++ b/x11-toolkits/fltk/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 |