Skip to content

Commit

Permalink
krusader: Fix ordered comparison between pointer and zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed Jul 5, 2022
1 parent 17081f6 commit 10e3962
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kde/krusader/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ long_description Krusader is an advanced twin panel (commander style) file ma
many extras such as directory synchronization, transparent archive handling, \
FTP, advanced search, internal viewer, ...

platforms darwin
homepage http://krusader.org
homepage https://krusader.org
master_sites sourceforge:project/krusader/krusader/${version}
distname krusader-${version}
use_bzip2 yes

checksums rmd160 569cf99ab8d2f23d888e922dc4c996d16ef1f0bc \
sha256 ca43ddeef91e2821142b723d13c0be4bf0d138a9718cccd914cecb675cc97dae
sha256 ca43ddeef91e2821142b723d13c0be4bf0d138a9718cccd914cecb675cc97dae \
size 4305463

patchfiles ordered-comparison.patch

if {![variant_isset docs]} {
patchfiles-append patch-CMakeLists.diff
Expand Down
60 changes: 60 additions & 0 deletions kde/krusader/files/ordered-comparison.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Fix:
error: ordered comparison between pointer and zero ('const void *' and 'int')
https://svnweb.freebsd.org/ports?view=revision&revision=478438
--- krusader/Dialogs/packgui.cpp.orig 2018-08-30 09:48:14 UTC
+++ krusader/Dialogs/packgui.cpp
@@ -40,7 +40,7 @@
#include <QtGui/QComboBox>
#include <khistorycombobox.h>

-#define PS(x) lst.contains(x)>0
+#define PS(x) bool(lst.contains(x))

// clear the statics first
QString PackGUI::filename = 0;
--- krusader/Konfigurator/kgarchives.cpp.orig 2018-08-30 09:48:24 UTC
+++ krusader/Konfigurator/kgarchives.cpp
@@ -163,7 +163,7 @@ void KgArchives::slotAutoConfigure()

void KgArchives::disableNonExistingPackers()
{
-#define PS(x) lst.contains(x)>0
+#define PS(x) bool(lst.contains(x))

// get list of available packers
QStringList lst = KRarcHandler::supportedPackers();
--- krusader/Konfigurator/krresulttable.cpp.orig 2018-08-30 09:48:49 UTC
+++ krusader/Konfigurator/krresulttable.cpp
@@ -27,7 +27,7 @@

using namespace std;

-#define PS(x) _supported.contains(x)>0
+#define PS(x) bool(_supported.contains(x))

KrResultTable::KrResultTable(QWidget* parent)
: QWidget(parent),
--- krusader/MountMan/kmountman.cpp.orig 2018-08-30 09:48:03 UTC
+++ krusader/MountMan/kmountman.cpp
@@ -109,18 +109,18 @@ KMountMan::~KMountMan() {}

bool KMountMan::invalidFilesystem(QString type)
{
- return (invalid_fs.contains(type) > 0);
+ return (invalid_fs.contains(type));
}

// this is an ugly hack, but type can actually be a mountpoint. oh well...
bool KMountMan::nonmountFilesystem(QString type, QString mntPoint)
{
- return((nonmount_fs.contains(type) > 0) || (nonmount_fs_mntpoint.contains(mntPoint) > 0));
+ return(bool(nonmount_fs.contains(type)) || bool(nonmount_fs_mntpoint.contains(mntPoint)));
}

bool KMountMan::networkFilesystem(QString type)
{
- return (network_fs.contains(type) > 0);
+ return (network_fs.contains(type));
}

void KMountMan::mainWindow()

0 comments on commit 10e3962

Please sign in to comment.