summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-01-18 11:53:56 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-01-18 11:53:56 +0000
commita95cd3710ba712df52fc724801d6dec43e68191a (patch)
treeb5373f1507a4a31f7dde2a432cfe621f1b8f564f
parentUpdate kernel-headers to 2.6.32-642.13.1.el6. (diff)
devel/qt4-linguist: unbreak with clang 4.0
messagemodel.cpp:186:61: error: ordered comparison between pointer and zero ('MessageItem *' and 'int') if (c->findMessage(m->text(), m->comment()) >= 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ PR: 216051 Submitted by: Adriaan de Groot <groot@kde.org> Obtained from: upstream (Qt5) Approved by: kde (tcberner) MFH: 2017Q1 (changes behavior) Differential Revision: https://reviews.freebsd.org/D9184
Notes
Notes: svn path=/head/; revision=431792
-rw-r--r--devel/qt4-linguist/Makefile1
-rw-r--r--devel/qt4-linguist/files/patch-tools_linguist_linguist_messagemodel.cpp14
2 files changed, 15 insertions, 0 deletions
diff --git a/devel/qt4-linguist/Makefile b/devel/qt4-linguist/Makefile
index f73d6b1c3cde..8cbab42559a8 100644
--- a/devel/qt4-linguist/Makefile
+++ b/devel/qt4-linguist/Makefile
@@ -3,6 +3,7 @@
PORTNAME= linguist
DISTVERSION= ${QT4_VERSION}
+PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= qt4-
diff --git a/devel/qt4-linguist/files/patch-tools_linguist_linguist_messagemodel.cpp b/devel/qt4-linguist/files/patch-tools_linguist_linguist_messagemodel.cpp
new file mode 100644
index 000000000000..58f5fb2beafc
--- /dev/null
+++ b/devel/qt4-linguist/files/patch-tools_linguist_linguist_messagemodel.cpp
@@ -0,0 +1,14 @@
+Fix bogus pointer comparison. Backport of upstream commit
+https://github.com/qt/qttools/commit/7138c963f9d1258bc1b49cb4d63c3e2b7d0ccfda
+
+--- tools/linguist/linguist/messagemodel.cpp.orig 2015-05-07 14:14:39 UTC
++++ tools/linguist/linguist/messagemodel.cpp
+@@ -183,7 +183,7 @@ static int calcMergeScore(const DataMode
+ if (ContextItem *c = one->findContext(oc->context())) {
+ for (int j = 0; j < oc->messageCount(); ++j) {
+ MessageItem *m = oc->messageItem(j);
+- if (c->findMessage(m->text(), m->comment()) >= 0)
++ if (c->findMessage(m->text(), m->comment()))
+ ++inBoth;
+ }
+ }