View Issue Details

IDProjectCategoryView StatusLast Update
0015111ScribusGeneralpublic2019-06-04 20:56
ReporterjurajF Assigned Tojghali  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSGNU/LinuxOS VersionDebian 8/Jessie
Product Version1.5.4.svn 
Target VersionFixed in Version1.5.4.svn 
Summary0015111: Compiler warnings
DescriptionWhile compiling i got warning about comparing signed and unsigned values:
/mnt/storage/place/work/source/scribus/git/15/my-15/scribus/scribus.cpp: In member function ‘void ScribusMainWindow::doPrintPreview()’:
/mnt/storage/place/work/source/scribus/git/15/my-15/scribus/scribus.cpp:6965:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < d.count(); i++)
                   ~~^~~~~~~~~~~
/mnt/storage/place/work/source/scribus/git/15/my-15/scribus/scribus.cpp: In member function ‘void ScribusMainWindow::initHyphenator()’:
/mnt/storage/place/work/source/scribus/git/15/my-15/scribus/scribus.cpp:8310:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < transDir.count(); i++)
                   ~~^~~~~~~~~~~~~~~~~~
The patch fix this warning.
TagsNo tags attached.
PatchYes

Relationships

has duplicate 0015117 closedjghali Warning compilation 

Activities

jurajF

2018-01-23 22:31

reporter  

0001-Compile-time-warning.patch (1,195 bytes)
From 89d42597801d5e089cdb8bca6475085231e3acee Mon Sep 17 00:00:00 2001
From: Juraj Fedel <wtxnh-scribus@yahoo.com.au>
Date: Tue, 23 Jan 2018 19:45:07 +0100
Subject: [PATCH] Compiler warning, unsigned comparation

---
 scribus/scribus.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp
index 7349980bd..9bc7fd4fe 100644
--- a/scribus/scribus.cpp
+++ b/scribus/scribus.cpp
@@ -6962,7 +6962,7 @@ void ScribusMainWindow::doPrintPreview()
 	QDir d(prefsManager->preferencesLocation()+"/", "sc.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
 	if ((d.exists()) && (d.count() != 0))
 	{
-		for (int i = 0; i < d.count(); i++)
+		for (uint i = 0; i < d.count(); i++)
 			QFile::remove(prefsManager->preferencesLocation() +"/" + d[i]);
 	}
 }
@@ -8307,7 +8307,7 @@ void ScribusMainWindow::initHyphenator()
 	QDir transDir(transPath, "*.*", QDir::Name, QDir::Files | QDir::NoSymLinks);
 	if ((transDir.exists()) && (transDir.count() != 0))
 	{
-		for (int i = 0; i < transDir.count(); i++)
+		for (uint i = 0; i < transDir.count(); i++)
 		{
 			QFileInfo fi(transPath + transDir[i]);
 			QString ext(fi.suffix().toLower());
-- 
2.15.1

jghali

2018-01-23 23:14

administrator   ~0044868

Applied, thanks!

Issue History

Date Modified Username Field Change
2018-01-23 22:31 jurajF New Issue
2018-01-23 22:31 jurajF File Added: 0001-Compile-time-warning.patch
2018-01-23 22:46 jghali Summary Compiler warnins => Compiler warnings
2018-01-23 23:14 jghali Assigned To => jghali
2018-01-23 23:14 jghali Status new => resolved
2018-01-23 23:14 jghali Resolution open => fixed
2018-01-23 23:14 jghali Fixed in Version => 1.5.4.svn
2018-01-23 23:14 jghali Note Added: 0044868
2018-02-02 12:33 jghali Relationship added has duplicate 0015117
2019-06-04 20:56 cbradney Status resolved => closed