Date: Thu, 23 Aug 2018 21:29:11 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r477926 - in head/x11/kdelibs-kde4: . files Message-ID: <201808232129.w7NLTBnx072454@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Thu Aug 23 21:29:11 2018 New Revision: 477926 URL: https://svnweb.freebsd.org/changeset/ports/477926 Log: 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 Added: head/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp (contents, props changed) Modified: head/x11/kdelibs-kde4/Makefile Modified: head/x11/kdelibs-kde4/Makefile ============================================================================== --- head/x11/kdelibs-kde4/Makefile Thu Aug 23 20:37:10 2018 (r477925) +++ head/x11/kdelibs-kde4/Makefile Thu Aug 23 21:29:11 2018 (r477926) @@ -3,7 +3,7 @@ PORTNAME= kdelibs PORTVERSION= ${KDE4_KDELIBS_VERSION} -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11 kde kde-applications PKGNAMESUFFIX= -kde4 Added: head/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/kdelibs-kde4/files/patch-kdecore_localization_klocale__kde.cpp Thu Aug 23 21:29:11 2018 (r477926) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808232129.w7NLTBnx072454>