diff options
author | adridg <adridg@FreeBSD.org> | 2018-08-24 05:29:11 +0800 |
---|---|---|
committer | adridg <adridg@FreeBSD.org> | 2018-08-24 05:29:11 +0800 |
commit | 6f2c730e6c3319eb2daef860164cf97146eb5497 (patch) | |
tree | 3c39931594a9d72bc750ccc20e0c15befadadf3c /x11 | |
parent | 788b3fee1c539fefa3c1e6eb7b996c3aff84edef (diff) | |
download | freebsd-ports-gnome-6f2c730e6c3319eb2daef860164cf97146eb5497.tar.gz freebsd-ports-gnome-6f2c730e6c3319eb2daef860164cf97146eb5497.tar.zst freebsd-ports-gnome-6f2c730e6c3319eb2daef860164cf97146eb5497.zip |
Massage strange comparison for clang7
kdecore/localization/klocale_kde.cpp:2441:59: error: ordered comparison between pointer and zero ('const void *' and 'int')
if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
contains() returns bool or QBool, so this was weird to begin with.
PR: 230462
Reported by: jbeich
Diffstat (limited to 'x11')
-rw-r--r-- | x11/kdelibs-kde4/Makefile | 2 | ||||
-rw-r--r-- | x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/x11/kdelibs-kde4/Makefile b/x11/kdelibs-kde4/Makefile index ea05e49ab677..ebfcfdec0b93 100644 --- a/x11/kdelibs-kde4/Makefile +++ b/x11/kdelibs-kde4/Makefile @@ -3,7 +3,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE4_KDELIBS_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11 kde kde-applications PKGNAMESUFFIX= -kde4 diff --git a/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp b/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp new file mode 100644 index 000000000000..fd3b36bfc0a6 --- /dev/null +++ b/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp @@ -0,0 +1,17 @@ +contains() returns bool or QBool, and clang7 picks the an +overload that casts to void *, and then fails on the ordered +comparison. Drop the strange comparison instead. + +--- kdecore/localization/klocale_kde.cpp.orig 2018-08-23 20:23:08 UTC ++++ kdecore/localization/klocale_kde.cpp +@@ -2438,8 +2438,8 @@ QString KLocalePrivate::formatLocaleTime + + bool KLocalePrivate::use12Clock() const + { +- if ((timeFormat().contains(QString::fromLatin1("%I")) > 0) || +- (timeFormat().contains(QString::fromLatin1("%l")) > 0)) { ++ if (bool(timeFormat().contains(QString::fromLatin1("%I"))) || ++ bool(timeFormat().contains(QString::fromLatin1("%l")))) { + return true; + } else { + return false; |