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)
This commit is contained in:
Jan Beich 2017-01-17 16:48:06 +00:00
parent 8293f0d8c9
commit 6708df81f7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431752
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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