View Issue Details

IDProjectCategoryView StatusLast Update
0016976ScribusBuild Systempublic2023-09-11 20:34
Reporterryandesign Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.4.8 
Fixed in Version1.4.9.svn 
Summary0016976: Build failure due to ordered comparison of pointer with integer zero
DescriptionWith newer compilers, Scribus 1.4.8 fails to build:

scribus/gtdialogs.cpp: In member function 'bool gtDialogs::runImporterDialog(const QStringList&)':
scribus/gtdialogs.cpp:163:45: error: ordered comparison of pointer with integer zero ('const void*' and 'int')
  163 | if (importers.contains(res) > 0)
      | ~~~~~~~~~~~~~~~~~~~~~~~~^~~

This was reported to MacPorts here:

https://trac.macports.org/ticket/67705

It was fixed on master as part of a larger refactoring:

https://github.com/scribusproject/scribus/commit/641554ada41094f94e0ca15adad6dbdb8c52a984#diff-fd4f2a403c73388c0e3f785d2bab61b5b36a3814297b2052fc3a719cbd0b0618L161-R172

but applying just that one-line change to 1.4.8 fixes the build for me.
TagsNo tags attached.
PatchYes

Activities

ryandesign

2023-07-07 20:46

reporter  

ordered-comparison.patch (533 bytes)   
Fix:

error: ordered comparison between pointer and zero ('const void *' and 'int')

https://github.com/scribusproject/scribus/commit/641554ada41094f94e0ca15adad6dbdb8c52a984#diff-fd4f2a403c73388c0e3f785d2bab61b5b36a3814297b2052fc3a719cbd0b0618L161-R172
--- scribus/gtdialogs.cpp.orig	2019-03-05 16:44:41.000000000 -0600
+++ scribus/gtdialogs.cpp	2023-07-07 15:32:47.000000000 -0500
@@ -160,7 +160,7 @@
 	if (imp != "false")
 	{
 		res = imp;
-		if (importers.contains(res) > 0)
+		if (importers.contains(res))
 			ok = true;
 	}
 	
ordered-comparison.patch (533 bytes)   

cbradney

2023-07-07 23:00

administrator   ~0050266

Thanks, committed in r25542

Issue History

Date Modified Username Field Change
2023-07-07 20:46 ryandesign New Issue
2023-07-07 20:46 ryandesign File Added: ordered-comparison.patch
2023-07-07 23:00 cbradney Assigned To => cbradney
2023-07-07 23:00 cbradney Status new => resolved
2023-07-07 23:00 cbradney Resolution open => fixed
2023-07-07 23:00 cbradney Fixed in Version => 1.4.9.svn
2023-07-07 23:00 cbradney Note Added: 0050266
2023-09-11 20:34 cbradney Status resolved => closed