Opened 5 years ago

Last modified 2 years ago

#58327 assigned defect

qcachegrind @0.7.4: error: ordered comparison between pointer and zero

Reported by: max-arnold (Max Arnold) Owned by: devernay (Frédéric Devernay)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: iakoder, NicosPavlov, cooljeanius (Eric Gallager)
Port: qcachegrind

Description

:debug:sysinfo macOS 10.14 (darwin/18.5.0) arch i386
:debug:sysinfo MacPorts 2.5.4
:debug:sysinfo Xcode 10.2
:debug:sysinfo SDK 10.14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.14
:info:build /usr/bin/clang++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.14 -Wall -W -DQT_DBUS_SUPPORT -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
-DQT_SHARED -I/opt/local/libexec/qt4/share/mkspecs/macx-g++ -I. -I/opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/libexec/qt4/Library/F
rameworks/QtGui.framework/Versions/4/Headers -I/opt/local/libexec/qt4/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I. -I../libcore -I../libviews -I/opt/local/libexec/q
t4/Library/Frameworks/QtDBus.framework/Versions/4/Headers -I/opt/local/libexec/qt4/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/libexec/qt4/Library/Framewor
ks/QtCore.framework/Versions/4/Headers -I/opt/local/libexec/qt4/include -I. -F/opt/local/libexec/qt4/Library/Frameworks -F/opt/local/libexec/qt4/lib -o logger.o ../libcore/logger
.cpp
:info:build ../libcore/tracedata.cpp:3262:30: error: ordered comparison between pointer and zero ('const void *' and 'int')
:info:build     if (_parts.contains(part)>0) return;
:info:build         ~~~~~~~~~~~~~~~~~~~~~^~
:info:build In file included from ../libcore/tracedata.cpp:20:
:info:build ../libcore/tracedata.h:696:14: warning: private field '_file' is not used [-Wunused-private-field]
:info:build   QIODevice* _file;
:info:build              ^
:info:build 1 warning and 1 error generated.
:info:build make[1]: *** [tracedata.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_qcachegrind/qcacheg
rind/work/kcachegrind-0.7.4/cgview'
:info:build make: *** [sub-cgview-all] Error 2

Change History (4)

comment:1 Changed 5 years ago by mf2k (Frank Schima)

Owner: set to devernay
Status: newassigned

In the future, please add the port maintainer(s) to Cc (port info --maintainers qcachegrind), if any.

comment:2 Changed 4 years ago by kencu (Ken)

has dup 59175

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: iakoder NicosPavlov added
Summary: qcachegrind-0.7.4_0: fails to compile libcore/tracedata.cppqcachegrind @0.7.4: error: ordered comparison between pointer and zero

Has duplicate #59526.

I don't fully understand the relationship between "qcachegrind" and "kcachegrind" (we have ports for both) but looking at https://github.com/KDE/kcachegrind/blob/master/libcore/tracedata.cpp#L3264 the developers don't seem to have fixed this problem. So the problem should be reported to them.

The fix is probably simply:

--- tracedata.cpp.orig	2019-10-30 19:09:34.000000000 -0500
+++ tracedata.cpp	2019-10-30 19:09:44.000000000 -0500
@@ -3261,7 +3261,7 @@
 
 void TraceData::addPart(TracePart* part)
 {
-    if (_parts.contains(part)>0) return;
+    if (_parts.contains(part)) return;
 
     if ((part->partNumber()==0) &&
         (part->processID()==0)) {

comment:4 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.