View Issue Details

IDProjectCategoryView StatusLast Update
0012778ScribusGeneralpublic2014-10-21 20:00
Reporterchhitz Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.0svn 
Fixed in Version1.5.0svn 
Summary0012778: [PATCH] fix a series of warnings
Descriptionthis patch series fixes a number of warnings from clang
TagsNo tags attached.
Patch

Relationships

related to 0012782 closedfschmid Upgrade libwpg 3rd party code 
related to 0012783 closedfschmid Upgrade libpgf 3rd party code 

Activities

chhitz

2014-10-17 15:23

reporter  

0001-silence-warnings-about-unused-variables.patch (15,512 bytes)   
From e20ed406111e409417d56ef16c135ec4e70c52bb Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:33:44 +0200
Subject: [PATCH 01/17] silence warnings about unused variables

---
 scribus/canvasmode_magnifier.cpp              | 2 +-
 scribus/canvasmode_magnifier.h                | 2 --
 scribus/canvasmode_nodeedit.h                 | 2 +-
 scribus/canvasmode_objimport.cpp              | 3 +--
 scribus/canvasmode_objimport.h                | 1 -
 scribus/fonts/scface_ttf.cpp                  | 2 --
 scribus/gtwriter.h                            | 1 -
 scribus/loadsaveplugin.cpp                    | 1 -
 scribus/pageitem_table.cpp                    | 1 +
 scribus/plugins/gettext/odtim/stylereader.cpp | 3 +--
 scribus/plugins/gettext/odtim/stylereader.h   | 3 +--
 scribus/plugins/gettext/xtgim/xtgim.h         | 5 +----
 scribus/plugins/import/cgm/importcgm.cpp      | 8 ++++----
 scribus/plugins/import/odg/importodg.cpp      | 1 -
 scribus/plugins/import/pct/importpct.cpp      | 3 +++
 scribus/plugins/import/pdf/slaoutput.cpp      | 1 -
 scribus/plugins/import/shape/importshape.cpp  | 2 --
 scribus/plugins/picbrowser/iview.h            | 1 -
 scribus/scimgdataloader_pict.cpp              | 3 +++
 scribus/scimgdataloader_pict.h                | 2 --
 scribus/scpainter.h                           | 1 -
 scribus/scpainterex_ps2.h                     | 3 ---
 scribus/scribusdoc.cpp                        | 1 -
 scribus/serializer.cpp                        | 2 +-
 scribus/serializer.h                          | 1 -
 scribus/ui/sclistwidgetdelegate.cpp           | 2 --
 26 files changed, 18 insertions(+), 39 deletions(-)

diff --git a/scribus/canvasmode_magnifier.cpp b/scribus/canvasmode_magnifier.cpp
index d907e28..06fca9c 100644
--- a/scribus/canvasmode_magnifier.cpp
+++ b/scribus/canvasmode_magnifier.cpp
@@ -52,7 +52,7 @@
 #include "util_math.h"
 
 
-CanvasMode_Magnifier::CanvasMode_Magnifier(ScribusView* view) : CanvasMode(view), m_ScMW(view->m_ScMW) 
+CanvasMode_Magnifier::CanvasMode_Magnifier(ScribusView* view) : CanvasMode(view)
 {
 	Mxp = Myp = -1;
 	Dxp = Dyp = -1;
diff --git a/scribus/canvasmode_magnifier.h b/scribus/canvasmode_magnifier.h
index ade8eae..bd3bbc4 100644
--- a/scribus/canvasmode_magnifier.h
+++ b/scribus/canvasmode_magnifier.h
@@ -58,8 +58,6 @@ private:
 
 	double Mxp, Myp, Dxp, Dyp;
 	double SeRx, SeRy;
-	ScribusMainWindow* m_ScMW;
-	bool m_cursorVisible;
 	bool m_lastPosWasOverGuide;
 };
 
diff --git a/scribus/canvasmode_nodeedit.h b/scribus/canvasmode_nodeedit.h
index 86f20bf..05c2e3c 100644
--- a/scribus/canvasmode_nodeedit.h
+++ b/scribus/canvasmode_nodeedit.h
@@ -69,7 +69,7 @@ private:
 	ScribusMainWindow* m_ScMW;
 	
 	RectSelect* m_rectangleSelect;
-	int Mxp, Myp, Dxp, Dyp, SeRx, SeRy, GxM, GyM;
+	int Mxp, Myp, Dxp, Dyp, GxM, GyM;
 	bool MoveGX, MoveGY;
 };
 
diff --git a/scribus/canvasmode_objimport.cpp b/scribus/canvasmode_objimport.cpp
index fa565e6..a25f32e 100644
--- a/scribus/canvasmode_objimport.cpp
+++ b/scribus/canvasmode_objimport.cpp
@@ -46,8 +46,7 @@
 
 
 CanvasMode_ObjImport::CanvasMode_ObjImport(ScribusView* view) :
-	CanvasMode(view),
-	m_ScMW(view->m_ScMW)
+	CanvasMode(view)
 {
 	Mxp = Myp = -1;
 	m_mimeData = NULL;
diff --git a/scribus/canvasmode_objimport.h b/scribus/canvasmode_objimport.h
index 1dac430..fd988cd 100644
--- a/scribus/canvasmode_objimport.h
+++ b/scribus/canvasmode_objimport.h
@@ -58,7 +58,6 @@ public:
 private:
 	QMimeData*          m_mimeData;
 	TransactionSettings* m_trSettings;
-	ScribusMainWindow*  m_ScMW;
 	double     Mxp, Myp;
 };
 
diff --git a/scribus/fonts/scface_ttf.cpp b/scribus/fonts/scface_ttf.cpp
index 2939a60..57cdd64 100644
--- a/scribus/fonts/scface_ttf.cpp
+++ b/scribus/fonts/scface_ttf.cpp
@@ -561,8 +561,6 @@ bool ScFace_ttf::glyphNames(QMap<uint, std::pair<QChar, QString> >& GList) const
 	                           (face->charmap && face->charmap->encoding == FT_ENCODING_UNICODE);
 	if (!avoidFntNames)
 		return FtFace::glyphNames(GList);
-
-	const bool hasPSNames = FT_HAS_GLYPH_NAMES(face);
 	
 //	qDebug() << "reading metrics for" << face->family_name << face->style_name;
 	charcode = FT_Get_First_Char(face, &gindex);
diff --git a/scribus/gtwriter.h b/scribus/gtwriter.h
index a072ac6..8431e28 100644
--- a/scribus/gtwriter.h
+++ b/scribus/gtwriter.h
@@ -78,7 +78,6 @@ private:
 	gtStyle* paragraphStyle;
 	gtStyle* characterStyle;
 	bool errorSet;
-	bool shouldAppend;
 	void setDefaultStyle();
 };
 
diff --git a/scribus/loadsaveplugin.cpp b/scribus/loadsaveplugin.cpp
index e9e956d..4bcba34 100644
--- a/scribus/loadsaveplugin.cpp
+++ b/scribus/loadsaveplugin.cpp
@@ -350,7 +350,6 @@ void LoadSavePlugin::unregisterFormat(unsigned int id)
 void LoadSavePlugin::unregisterAll()
 {
 	QList<FileFormat>::iterator it(formats.begin());
-	QList<FileFormat>::iterator itEnd(formats.end());
 	while (it != formats.end())
 	{
 		if ((*it).plug == this)
diff --git a/scribus/pageitem_table.cpp b/scribus/pageitem_table.cpp
index 4105eab..5f8bd9f 100644
--- a/scribus/pageitem_table.cpp
+++ b/scribus/pageitem_table.cpp
@@ -1253,6 +1253,7 @@ void PageItem_Table::assertValid() const
 	// Check that selected cells are valid.
 	foreach (const TableCell& cell, m_selection)
 	{
+		(void)cell;
 		Q_ASSERT(cell.isValid());
 		Q_ASSERT(validCell(cell.row(), cell.column()));
 	}
diff --git a/scribus/plugins/gettext/odtim/stylereader.cpp b/scribus/plugins/gettext/odtim/stylereader.cpp
index 9ba1d5a..23c17a9 100644
--- a/scribus/plugins/gettext/odtim/stylereader.cpp
+++ b/scribus/plugins/gettext/odtim/stylereader.cpp
@@ -1061,9 +1061,8 @@ ListLevel::~ListLevel()
 
 /*** ListStyle **********************************************************************************/
 
-ListStyle::ListStyle(const QString &name, bool consecutiveNumbering, uint currentLevel) :
+ListStyle::ListStyle(const QString &name, uint currentLevel) :
 m_name(name),
-m_consecutiveNumbering(consecutiveNumbering),
 m_currentLevel(currentLevel),
 m_count(0)
 {
diff --git a/scribus/plugins/gettext/odtim/stylereader.h b/scribus/plugins/gettext/odtim/stylereader.h
index 80f1c7b..9624cc3 100644
--- a/scribus/plugins/gettext/odtim/stylereader.h
+++ b/scribus/plugins/gettext/odtim/stylereader.h
@@ -96,7 +96,7 @@ private:
 class ListStyle
 {
 public:
-	ListStyle(const QString &name, bool consecutiveNumbering = false, uint currentLevel = 1);
+	ListStyle(const QString &name, uint currentLevel = 1);
 	~ListStyle();
 	void addLevel(uint level, ListLevel *llevel);
 	QString bullet();
@@ -106,7 +106,6 @@ public:
 	QString& name();
 private:
 	QString m_name;
-	bool m_consecutiveNumbering;
 	uint m_currentLevel;
 	uint m_count;
 	ListLevel* levels[11];
diff --git a/scribus/plugins/gettext/xtgim/xtgim.h b/scribus/plugins/gettext/xtgim/xtgim.h
index fa5b85a..b2a2d72 100755
--- a/scribus/plugins/gettext/xtgim/xtgim.h
+++ b/scribus/plugins/gettext/xtgim/xtgim.h
@@ -48,13 +48,10 @@ private:
 	QString filename;
 	QString in_Buffer;
 	QByteArray buffer;
-	PageItem *textFrame;
-	TextWriter *writer;
 	void loadFiletoArray();
 	QString toUnicode(const QByteArray& rawText);
-	StyleManager *StyleMan;
 public:
 	XtgIm(QString fileName,QString enc,PageItem *textItem,bool textOnly);
 	~XtgIm();
 };
-#endif			/* XTGIM_H */
\ No newline at end of file
+#endif			/* XTGIM_H */
diff --git a/scribus/plugins/import/cgm/importcgm.cpp b/scribus/plugins/import/cgm/importcgm.cpp
index ca06f1f..499d321 100644
--- a/scribus/plugins/import/cgm/importcgm.cpp
+++ b/scribus/plugins/import/cgm/importcgm.cpp
@@ -2521,10 +2521,10 @@ void CgmPlug::decodeClass5(QDataStream &ts, quint16 elemID, quint16 paramLen)
 	}
 	else if (elemID == 43)
 	{
-		int posI = ts.device()->pos();
-		uint type = getBinaryUInt(ts, indexPrecision);
-		QPointF p1 = convertCoords(getBinaryCoords(ts));
-		QPointF p2 = convertCoords(getBinaryCoords(ts));
+		//int posI = ts.device()->pos();
+		//uint type = getBinaryUInt(ts, indexPrecision);
+		//QPointF p1 = convertCoords(getBinaryCoords(ts));
+		//QPointF p2 = convertCoords(getBinaryCoords(ts));
 		uint index = getBinaryUInt(ts, intPrecision);
 	//	qDebug() << "INTERPOLATED INTERIOR  Type" << type << "from" << p1 << "to" << p2 << "Stages" << index << "at" << posI << realPrecision << realMantissa;
 		for (uint s = 0; s < index; s++)
diff --git a/scribus/plugins/import/odg/importodg.cpp b/scribus/plugins/import/odg/importodg.cpp
index 139d0bd..6d1af06 100644
--- a/scribus/plugins/import/odg/importodg.cpp
+++ b/scribus/plugins/import/odg/importodg.cpp
@@ -3448,7 +3448,6 @@ PageItem* OdgPlug::applyStartArrow(PageItem* ite, ObjStyle &obState)
 					EndArrow.map(m);
 					refP = m.map(refP);
 					QPainterPath pa2 = EndArrow.toQPainterPath(true);
-					QRectF br2 = pa2.boundingRect();
 					QTransform m2;
 					FPoint grOffset2(getMinClipF(&EndArrow));
 					m2.translate(-grOffset2.x(), -grOffset2.y());
diff --git a/scribus/plugins/import/pct/importpct.cpp b/scribus/plugins/import/pct/importpct.cpp
index 56e4490..4022a2a 100644
--- a/scribus/plugins/import/pct/importpct.cpp
+++ b/scribus/plugins/import/pct/importpct.cpp
@@ -1716,6 +1716,7 @@ void PctPlug::handlePixmap(QDataStream &ts, quint16 opCode)
 	}
 // reading scrRect
 	QRect scrRect = readRect(ts);
+	(void)scrRect;
 //	qDebug() << "Src Rect" << scrRect;
 // reading dstRect
 	QRect dstRect = readRect(ts);
@@ -1882,10 +1883,12 @@ void PctPlug::handleQuickTime(QDataStream &ts, quint16 opCode)
 	alignStreamToWord(ts, 38);		// Skip version and Matrix information
 	ts >> matteSize;
 	QRect matteRect = readRect(ts);
+	(void)matteRect;
 	if (opCode == 0x8200)
 	{
 		ts >> mode;
 		QRect srcRect = readRect(ts);
+		(void)srcRect;
 		alignStreamToWord(ts, 4);
 		ts >> maskSize;
 		if (matteSize != 0)
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index 050e0a4..d19edec 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -3588,7 +3588,6 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub
 			{
 				int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, xCoor, yCoor, 10, 10, 0, CurrColorFill, CommonStrings::None, true);
 				PageItem* ite = m_doc->Items->at(z);
-				FPoint tp2(getMinClipF(&textPath));
 				QTransform mm;
 				mm.scale(1, -1);
 				mm.translate(x, -y);
diff --git a/scribus/plugins/import/shape/importshape.cpp b/scribus/plugins/import/shape/importshape.cpp
index 81fe441..98b492d 100644
--- a/scribus/plugins/import/shape/importshape.cpp
+++ b/scribus/plugins/import/shape/importshape.cpp
@@ -666,8 +666,6 @@ void ShapePlug::parseGroupProperties(QDomNode &DOC, double &minXCoor, double &mi
 {
 	QString FillCol = "White";
 	QString StrokeCol = "Black";
-	QColor stroke = Qt::black;
-	QColor fill = Qt::white;
 	while(!DOC.isNull())
 	{
 		double x1, y1, x2, y2;
diff --git a/scribus/plugins/picbrowser/iview.h b/scribus/plugins/picbrowser/iview.h
index abc5b78..05d2133 100644
--- a/scribus/plugins/picbrowser/iview.h
+++ b/scribus/plugins/picbrowser/iview.h
@@ -45,7 +45,6 @@ class IView: public QGraphicsView
 
 		QPointF mouseStartPoint;
 		QRect theRect;
-		bool isSelecting;
 		bool isPanning;
 
 		bool m_keepFitted;
diff --git a/scribus/scimgdataloader_pict.cpp b/scribus/scimgdataloader_pict.cpp
index 14e6b6d..ccadaa3 100644
--- a/scribus/scimgdataloader_pict.cpp
+++ b/scribus/scimgdataloader_pict.cpp
@@ -1317,6 +1317,7 @@ void ScImgDataLoader_PICT::handlePixmap(QDataStream &ts, quint16 opCode)
 	}
 // reading scrRect
 	QRect scrRect = readRect(ts);
+	(void)scrRect;
 //	qDebug() << "Src Rect" << scrRect;
 // reading dstRect
 	QRect dstRect = readRect(ts);
@@ -1465,10 +1466,12 @@ void ScImgDataLoader_PICT::handleQuickTime(QDataStream &ts, quint16 opCode)
 	alignStreamToWord(ts, 38);		// Skip version and Matrix information
 	ts >> matteSize;
 	QRect matteRect = readRect(ts);
+	(void)matteRect;
 	if (opCode == 0x8200)
 	{
 		ts >> mode;
 		QRect srcRect = readRect(ts);
+		(void)srcRect;
 		alignStreamToWord(ts, 4);
 		ts >> maskSize;
 		if (matteSize != 0)
diff --git a/scribus/scimgdataloader_pict.h b/scribus/scimgdataloader_pict.h
index 4a45a5c..759ab2a 100644
--- a/scribus/scimgdataloader_pict.h
+++ b/scribus/scimgdataloader_pict.h
@@ -77,8 +77,6 @@ private:
 	QByteArray patternData;
 	QRect currRect;
 	QBrush currPatternBrush;
-	int currRectItemNr;
-	int currRectType;
 	QRect lastImageRect;
 	QPoint ovalSize;
 	QMap<int, QString> fontMap;
diff --git a/scribus/scpainter.h b/scribus/scpainter.h
index 63b4be2..ec76e25 100644
--- a/scribus/scpainter.h
+++ b/scribus/scpainter.h
@@ -183,7 +183,6 @@ private:
 	double fill_trans;
 	bool m_fillRule;
 	int fillMode;				// 0 = none, 1 = solid, 2 = gradient 3 = pattern 4 = hatch
-	int gradientMode;		// 1 = linear, 2 = radial, 3 = 4colour
 	double patternScaleX;
 	double patternScaleY;
 	double patternOffsetX;
diff --git a/scribus/scpainterex_ps2.h b/scribus/scpainterex_ps2.h
index 0d009c5..5f12296 100644
--- a/scribus/scpainterex_ps2.h
+++ b/scribus/scpainterex_ps2.h
@@ -210,7 +210,6 @@ private:
 	double m_fillTrans;
 	bool   m_fillRule;
 	int    m_fillMode;			// 0 = none, 1 = solid, 2 = gradient
-	int    m_gradientMode;		// 1 = linear, 2 = radial
 
 	double m_patternScaleX;
 	double m_patternScaleY;
@@ -236,8 +235,6 @@ private:
 	double m_offset;
 /* Transformation Stack */
 	QStack<QTransform> m_stack;
-/* Zoom Factor of the Painter */
-	double m_zoomFactor;
 
 /* Some data to describe state of drawing */	
 	bool m_pathIsClosed;
diff --git a/scribus/scribusdoc.cpp b/scribus/scribusdoc.cpp
index 55db12e..8f4b021 100644
--- a/scribus/scribusdoc.cpp
+++ b/scribus/scribusdoc.cpp
@@ -9893,7 +9893,6 @@ void ScribusDoc::MirrorPolyV(PageItem* currItem)
 			ss->set("IS_CONTOUR", true);
 			undoManager->action(currItem, ss, Um::IBorder);
 		}
-		FPoint tp2(getMinClipF(&currItem->ContourLine));
 		FPoint tp(getMaxClipF(&currItem->ContourLine));
 		ma.translate(0, qRound(tp.y()));
 		ma.scale(1, -1);
diff --git a/scribus/serializer.cpp b/scribus/serializer.cpp
index 32b0a04..e4ec4e3 100644
--- a/scribus/serializer.cpp
+++ b/scribus/serializer.cpp
@@ -138,7 +138,7 @@ class MergeColors_body : public Action_body
 class MergeColors : public MakeAction<MergeColors_body>
 {};
 
-Serializer::Serializer(ScribusDoc& doc) : Digester(), m_Doc(doc)
+Serializer::Serializer(ScribusDoc& doc) : Digester()
 {
 	// register desaxe rules for styles, colors and elems
 	addRule("/SCRIBUSFRAGMENT", Factory<Collection>());
diff --git a/scribus/serializer.h b/scribus/serializer.h
index f6382cc..1930be5 100644
--- a/scribus/serializer.h
+++ b/scribus/serializer.h
@@ -80,7 +80,6 @@ public:
 								  const QString& txt);
 
 private:
-	ScribusDoc& m_Doc;
 	ColorList backUpColors;
 //	Selection importCollection();
 //	void updateGradientColors(const ColorList& colors);
diff --git a/scribus/ui/sclistwidgetdelegate.cpp b/scribus/ui/sclistwidgetdelegate.cpp
index 34d63f1..8bbeb23 100644
--- a/scribus/ui/sclistwidgetdelegate.cpp
+++ b/scribus/ui/sclistwidgetdelegate.cpp
@@ -31,8 +31,6 @@ ScListWidgetDelegate::ScListWidgetDelegate(QListWidget *view, QWidget *parent) :
 
 void ScListWidgetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 {
-	const QAbstractItemModel *model = index.model();
-	Q_ASSERT(model);
 	if (m_dispIconOnly)
 	{
 		painter->save();
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0002-silence-warnings-about-uninitialized-variables.patch (965 bytes)   
From b63dd5448add5138d154a1404299b402bb141acc Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:34:22 +0200
Subject: [PATCH 02/17] silence warnings about uninitialized variables

---
 scribus/plugins/import/ai/importai.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scribus/plugins/import/ai/importai.cpp b/scribus/plugins/import/ai/importai.cpp
index 2138cbf..94263b1 100644
--- a/scribus/plugins/import/ai/importai.cpp
+++ b/scribus/plugins/import/ai/importai.cpp
@@ -2164,6 +2164,9 @@ void AIPlug::processData(QString data)
 				QString nodeVals = cmdLine.mid(ans+1, ens-ans-1);
 				ScTextStream mVals4(&nodeVals, QIODevice::ReadOnly);
 				kVal = 0.0;
+				cVal = 0.0;
+				mVal = 0.0;
+				yVal = 0.0;
 				if (meshColorMode == 0)
 					mVals4 >> cVal >> mVal >> yVal >> kVal >> coorX1 >> coorY1 >> coorX2 >> coorY2 >> dummy >> coorX3 >> coorY3;
 				else if (meshColorMode == 1)
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0003-silence-warnings-about-variables-assigned-to-themsel.patch (4,580 bytes)   
From c21217ee269d07ef9cf6dec6f54f6194c3fb4d9b Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:35:06 +0200
Subject: [PATCH 03/17] silence warnings about variables assigned to themselves

---
 scribus/plugins/import/odg/importodg.cpp     | 4 ++--
 scribus/plugins/import/oodraw/oodrawimp.cpp  | 4 ++--
 scribus/plugins/import/shape/importshape.cpp | 4 ++--
 scribus/plugins/import/svg/svgplugin.cpp     | 4 ++--
 scribus/plugins/import/viva/importviva.cpp   | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/scribus/plugins/import/odg/importodg.cpp b/scribus/plugins/import/odg/importodg.cpp
index 6d1af06..11d3d25 100644
--- a/scribus/plugins/import/odg/importodg.cpp
+++ b/scribus/plugins/import/odg/importodg.cpp
@@ -2832,7 +2832,7 @@ double OdgPlug::parseUnit(const QString &unit)
 		unitval.replace( "%", "" );
 	double value = ScCLocale::toDoubleC(unitval);
 	if( unit.right( 2 ) == "pt" )
-		value = value;
+		{}/* value = value; */ //no change
 	else if( unit.right( 2 ) == "cm" )
 		value = ( value / 2.54 ) * 72;
 	else if( unit.right( 2 ) == "mm" )
@@ -2840,7 +2840,7 @@ double OdgPlug::parseUnit(const QString &unit)
 	else if( unit.right( 2 ) == "in" )
 		value = value * 72;
 	else if( unit.right( 2 ) == "px" )
-		value = value;
+		{}/* value = value; */ //no change
 	else if( unit.right( 1 ) == "%" )
 		value = value / 100.0;
 	return value;
diff --git a/scribus/plugins/import/oodraw/oodrawimp.cpp b/scribus/plugins/import/oodraw/oodrawimp.cpp
index 0f1d369..17bcffa 100644
--- a/scribus/plugins/import/oodraw/oodrawimp.cpp
+++ b/scribus/plugins/import/oodraw/oodrawimp.cpp
@@ -1350,7 +1350,7 @@ double OODPlug::parseUnit(const QString &unit)
 		unitval.replace( "px", "" );
 	double value = ScCLocale::toDoubleC(unitval);
 	if( unit.right( 2 ) == "pt" )
-		value = value;
+		{}/* value = value; */ // no change
 	else if( unit.right( 2 ) == "cm" )
 		value = ( value / 2.54 ) * 72;
 	else if( unit.right( 2 ) == "mm" )
@@ -1358,7 +1358,7 @@ double OODPlug::parseUnit(const QString &unit)
 	else if( unit.right( 2 ) == "in" )
 		value = value * 72;
 	else if( unit.right( 2 ) == "px" )
-		value = value;
+		{}/* value = value; */ // no change
 	return value;
 }
 
diff --git a/scribus/plugins/import/shape/importshape.cpp b/scribus/plugins/import/shape/importshape.cpp
index 98b492d..b94b232 100644
--- a/scribus/plugins/import/shape/importshape.cpp
+++ b/scribus/plugins/import/shape/importshape.cpp
@@ -843,7 +843,7 @@ double ShapePlug::parseUnit(const QString &unit)
 		noUnit = true;
 	double value = ScCLocale::toDoubleC(unitval);
 	if( unit.right( 2 ) == sPT )
-		value = value;
+		{}/* value = value; */ //no change
 	else if( unit.right( 2 ) == sCM )
 	{
 		value = cm2pts(value);
@@ -865,7 +865,7 @@ double ShapePlug::parseUnit(const QString &unit)
 		Conversion = 0.8;
 	}
 	else if(noUnit)
-		value = value;
+		{}/* value = value; */ //no change
 	return value;
 }
 
diff --git a/scribus/plugins/import/svg/svgplugin.cpp b/scribus/plugins/import/svg/svgplugin.cpp
index dfb6d78..5f7b761 100644
--- a/scribus/plugins/import/svg/svgplugin.cpp
+++ b/scribus/plugins/import/svg/svgplugin.cpp
@@ -2064,7 +2064,7 @@ double SVGPlug::parseUnit(const QString &unit)
 		noUnit = true;
 	double value = ScCLocale::toDoubleC(unitval);
 	if (unit.right( 2 ) == "pt")
-		value = value;
+		{}/* value = value; */ //no change
 	else if (unit.right( 2 ) == "cm")
 		value = ( value / 2.54 ) * 72;
 	else if (unit.right( 2 ) == "mm")
@@ -2074,7 +2074,7 @@ double SVGPlug::parseUnit(const QString &unit)
 	else if (unit.right( 2 ) == "px")
 		value = value * 0.8;
 	else if (noUnit)
-		value = value;
+		{}/* value = value; */ //no change
 	return value;
 }
 
diff --git a/scribus/plugins/import/viva/importviva.cpp b/scribus/plugins/import/viva/importviva.cpp
index fd06d47..5d8f50d 100644
--- a/scribus/plugins/import/viva/importviva.cpp
+++ b/scribus/plugins/import/viva/importviva.cpp
@@ -94,7 +94,7 @@ double VivaPlug::parseUnit(const QString &unit)
 		noUnit = true;
 	double value = ScCLocale::toDoubleC(unitval);
 	if (unit.right( 2 ) == "pt")
-		value = value;
+		{}/* value = value; */ //no change
 	else if (unit.right( 2 ) == "cm")
 		value = ( value / 2.54 ) * 72;
 	else if (unit.right( 2 ) == "mm")
@@ -104,7 +104,7 @@ double VivaPlug::parseUnit(const QString &unit)
 	else if (unit.right( 2 ) == "px")
 		value = value * 0.8;
 	else if (noUnit)
-		value = value;
+		{}/* value = value; */ //no change
 	return value;
 }
 
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0004-declare-virtual-destructor-for-base-class.patch (715 bytes)   
From 483d42c99b3f54a47d79d204afb040985ad9e10a Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:35:51 +0200
Subject: [PATCH 04/17] declare virtual destructor for base class

---
 scribus/plugins/import/wmf/wmfhandle.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scribus/plugins/import/wmf/wmfhandle.h b/scribus/plugins/import/wmf/wmfhandle.h
index cefd228..3bbb538 100644
--- a/scribus/plugins/import/wmf/wmfhandle.h
+++ b/scribus/plugins/import/wmf/wmfhandle.h
@@ -16,6 +16,7 @@ class WmfObjHandle
 {
 public:
     virtual void apply( WMFContext& p ) = 0;
+    virtual ~WmfObjHandle() {};
 };
 
 class WmfObjBrushHandle: public WmfObjHandle
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0005-synchronize-function-signature-with-Poppler.patch (1,522 bytes)   
From c01c3471741f18323c4a419c28b96c25d08dea60 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:36:49 +0200
Subject: [PATCH 05/17] synchronize function signature with Poppler

---
 scribus/plugins/import/pdf/slaoutput.cpp | 2 +-
 scribus/plugins/import/pdf/slaoutput.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
index d19edec..ac622a6 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -1210,7 +1210,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA)
 	true);
 }
 
-void SlaOutputDev::startPage(int pageNum, GfxState *)
+void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
 {
 	m_formWidgets = pdfDoc->getPage(pageNum)->getFormWidgets();
 	m_radioMap.clear();
diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
index 2f57b3e..9186c7c 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -164,7 +164,7 @@ public:
 	virtual GBool useShadedFills(int type) { return type <= 7; }
 	virtual GBool useFillColorStop() { return gTrue; }
 	virtual GBool useDrawForm() { return gFalse; }
-	virtual void startPage(int pageNum, GfxState *);
+	virtual void startPage(int pageNum, GfxState *, XRef *);
 	virtual void endPage();
 	// grapics state
 	virtual void saveState(GfxState *state);
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0006-silenc-warnings-about-possible-possible-use-of-unary.patch (1,863 bytes)   
From 72844fdbf8824113ca3c11c95f96da8b02df6b36 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:37:38 +0200
Subject: [PATCH 06/17] silenc warnings about possible possible use of unary
 operator

---
 scribus/scimage.cpp   | 2 +-
 scribus/scpainter.cpp | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scribus/scimage.cpp b/scribus/scimage.cpp
index 326ec1b..0edca00 100644
--- a/scribus/scimage.cpp
+++ b/scribus/scimage.cpp
@@ -436,7 +436,7 @@ void ScImage::blur(int radius)
 		rinsum = ginsum = binsum = ainsum
 			= routsum = goutsum = boutsum = aoutsum
 			= rsum = gsum = bsum = asum = 0;
-		for(i =- radius; i <= radius; ++i)
+		for(i = -radius; i <= radius; ++i)
 		{
 			p = pix[yi+qMin(wm,qMax(i,0))];
 			sir = stack[i+radius];
diff --git a/scribus/scpainter.cpp b/scribus/scpainter.cpp
index ace3779..009dd1f 100644
--- a/scribus/scpainter.cpp
+++ b/scribus/scpainter.cpp
@@ -2110,7 +2110,7 @@ void ScPainter::blurAlpha(int radius)
 	for (y = 0; y < h; ++y)
 	{
 		ainsum = aoutsum = asum = 0;
-		for(i =- radius; i <= radius; ++i)
+		for(i = -radius; i <= radius; ++i)
 		{
 			p = pix[yi+qMin(wm,qMax(i,0))];
 			sir = stack[i+radius];
@@ -2147,8 +2147,8 @@ void ScPainter::blurAlpha(int radius)
 	for (x=0; x < w; ++x)
 	{
 		ainsum = aoutsum = asum = 0;
-		yp =- radius * w;
-		for(i=-radius; i <= radius; ++i)
+		yp = -radius * w;
+		for(i = -radius; i <= radius; ++i)
 		{
 			yi=qMax(0,yp)+x;
 			sir = stack[i+radius];
@@ -2241,7 +2241,7 @@ void ScPainter::blur(int radius)
 	for (y = 0; y < h; ++y)
 	{
 		rinsum = ginsum = binsum = ainsum = routsum = goutsum = boutsum = aoutsum = rsum = gsum = bsum = asum = 0;
-		for(i =- radius; i <= radius; ++i)
+		for(i = -radius; i <= radius; ++i)
 		{
 			p = pix[yi+qMin(wm,qMax(i,0))];
 			sir = stack[i+radius];
-- 
2.1.0

chhitz

2014-10-17 15:23

reporter  

0007-synchronize-function-signature-with-Qt.patch (1,062 bytes)   
From 7ae9ce202020a662d57c5060cbb9572da3a59ac1 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:38:02 +0200
Subject: [PATCH 07/17] synchronize function signature with Qt

---
 scribus/ui/newfile.cpp | 2 +-
 scribus/ui/newfile.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scribus/ui/newfile.cpp b/scribus/ui/newfile.cpp
index 2496c78..562d36e 100644
--- a/scribus/ui/newfile.cpp
+++ b/scribus/ui/newfile.cpp
@@ -83,7 +83,7 @@ void PageLayoutsWidget::arrangeIcons()
 	maxY = maxSizeY+10;
 }
 
-const QSize PageLayoutsWidget::minimumSizeHint()
+QSize PageLayoutsWidget::minimumSizeHint() const
 {
 	return QSize(maxX, maxY);
 }
diff --git a/scribus/ui/newfile.h b/scribus/ui/newfile.h
index 79e33ce..09f0c1f 100644
--- a/scribus/ui/newfile.h
+++ b/scribus/ui/newfile.h
@@ -44,7 +44,7 @@ public:
 	PageLayoutsWidget(QWidget* parent);
 	~PageLayoutsWidget() {};
 	void arrangeIcons();
-	const QSize minimumSizeHint();
+	QSize minimumSizeHint() const;
 	int maxX;
 	int maxY;
 };
-- 
2.1.0

chhitz

2014-10-17 15:24

reporter  

0008-silence-warnings-about-masking-functions-from-base-c.patch (775 bytes)   
From 678f3c3f0b4a643a9c237cb22e6ab80729b1a50d Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:38:26 +0200
Subject: [PATCH 08/17] silence warnings about masking functions from base
 class

---
 scribus/ui/marknote.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scribus/ui/marknote.h b/scribus/ui/marknote.h
index 859d607..508821e 100644
--- a/scribus/ui/marknote.h
+++ b/scribus/ui/marknote.h
@@ -12,6 +12,7 @@ class SCRIBUS_API MarkNote : public MarkInsert, private Ui::MarkNoteDlg
 public:
 	explicit MarkNote(const QList<NotesStyle*>& notesStylesList, QWidget *parent = NULL);
 	virtual NotesStyle* values();
+	using MarkInsert::setValues;
 	virtual void setValues(NotesStyle* defaultStyle);
 
 protected:
-- 
2.1.0

chhitz

2014-10-17 15:24

reporter  

0009-call-FcInitLoadConfigAndFonts-instead-of-declaring-a.patch (1,276 bytes)   
From f09b6a8cdece21b0e278ebbe5182ecc59a31f1fb Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 10:39:04 +0200
Subject: [PATCH 09/17] call FcInitLoadConfigAndFonts() instead of declaring a
 function pointer

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

diff --git a/scribus/scfonts.cpp b/scribus/scfonts.cpp
index 284776b..4b0fdef 100644
--- a/scribus/scfonts.cpp
+++ b/scribus/scfonts.cpp
@@ -772,7 +772,7 @@ void SCFonts::AddFontconfigFonts()
 {
 	// All-in-one library setup. Perhaps this should be in
 	// the SCFonts constructor.
-	FcConfig* FcInitLoadConfigAndFonts();
+	FcConfig* config = FcInitLoadConfigAndFonts();
 	// The pattern controls what fonts to match. In this case we want to
 	// match all scalable fonts, but ignore bitmap fonts.
 	FcPattern* pat = FcPatternBuild(NULL,
@@ -784,7 +784,7 @@ void SCFonts::AddFontconfigFonts()
 	FcObjectSet* os = FcObjectSetBuild (FC_FILE, (char *) 0);
 	// Now ask fontconfig to retrieve info as specified in 'os' about fonts
 	// matching pattern 'pat'.
-	FcFontSet* fs = FcFontList(0, pat, os);
+	FcFontSet* fs = FcFontList(config, pat, os);
 	FcObjectSetDestroy(os);
 	FcPatternDestroy(pat);
 	// Create the Freetype library
-- 
2.1.0

chhitz

2014-10-17 15:24

reporter  

0010-add-missing-case-Type_CJK.patch (1,030 bytes)   
From 12c1fc85006d74e757cbb2c542deac4f00c38e28 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:07:43 +0200
Subject: [PATCH 10/17] add missing case "Type_CJK"

---
 scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp b/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
index b6050d0..f8049ef 100644
--- a/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
+++ b/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
@@ -1302,6 +1302,9 @@ void Scribus150Format::writeNotesStyles(ScXmlStreamWriter & docu)
 			case Type_None:
 				docu.writeAttribute("Type", "Type_None");
 				break;
+			case Type_CJK:
+				docu.writeAttribute("Type", "Type_CJK");
+				break;
 		}
 		docu.writeAttribute("Range", (int) NS->range());
 		docu.writeAttribute("Prefix", NS->prefix());
-- 
2.1.0

chhitz

2014-10-17 15:24

reporter  

0011-silence-warning-about-unused-return-value.patch (920 bytes)   
From 67d73370572e40bc2b5b9c13c083844ac8eedadb Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:08:42 +0200
Subject: [PATCH 11/17] silence warning about unused return value

---
 scribus/scimgdataloader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scribus/scimgdataloader.cpp b/scribus/scimgdataloader.cpp
index e3a7981..56621c5 100644
--- a/scribus/scimgdataloader.cpp
+++ b/scribus/scimgdataloader.cpp
@@ -247,7 +247,7 @@ void ScImgDataLoader::parseRessourceData( QDataStream & s, const PSDHeader & hea
 					s.readRawData(buffer, thsize);
 					QImage imth;
 					imth.loadFromData((const uchar*)buffer, thsize, "JPEG");
-					imth.convertToFormat(QImage::Format_ARGB32);
+					(void)imth.convertToFormat(QImage::Format_ARGB32);
 					if (resID == 0x0409)
 						m_imageInfoRecord.exifInfo.thumbnail = imth.rgbSwapped();
 					else
-- 
2.1.0

chhitz

2014-10-17 15:24

reporter  

0012-wpg-size_t-is-unsigned-can-never-be-less-than-0.patch (974 bytes)   
From a1db3492eac758c25921a27bab5b1fe0e7e1c45c Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:10:28 +0200
Subject: [PATCH 12/17] wpg: size_t is unsigned; can never be less than 0

---
 scribus/third_party/wpg/WPGStreamImplementation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scribus/third_party/wpg/WPGStreamImplementation.cpp b/scribus/third_party/wpg/WPGStreamImplementation.cpp
index 308bf94..4d783f7 100644
--- a/scribus/third_party/wpg/WPGStreamImplementation.cpp
+++ b/scribus/third_party/wpg/WPGStreamImplementation.cpp
@@ -325,7 +325,7 @@ const uint8_t *WPGMemoryStream::read(size_t numBytes, size_t &numBytesRead)
 	if (0 == numBytes)
 		return 0;
 
-	if (numBytes < 0 || atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2)
+	if (atEOS() || numBytes > (std::numeric_limits<unsigned long>::max)()/2)
 		return 0;
 
 	unsigned long curpos = d->buffer.tellg();
-- 
2.1.0

chhitz

2014-10-17 15:25

reporter  

0013-wpg-silence-warning-about-unused-cell-variable.patch (852 bytes)   
From ed65cee88a9ba3ca7ed05acaa769882bd73da5cf Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:10:59 +0200
Subject: [PATCH 13/17] wpg: silence warning about unused cell variable

---
 scribus/third_party/wpg/WPG1Parser.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scribus/third_party/wpg/WPG1Parser.cpp b/scribus/third_party/wpg/WPG1Parser.cpp
index 0465077..ff1451a 100644
--- a/scribus/third_party/wpg/WPG1Parser.cpp
+++ b/scribus/third_party/wpg/WPG1Parser.cpp
@@ -654,6 +654,7 @@ void WPG1Parser::fillPixels(libwpg::WPGBitmap& bitmap, const unsigned char* buff
 		for(unsigned y = 0; y < height; y++)
 		{
 			libwpg::WPGColor color = bitmap.pixel(x,y);
+			(void)color;
 			WPG_DEBUG_MSG((" pixel at %d, %d: %3d %3d %3d\n", x, y, color.red, color.green, color.blue));
 		}
 	}
-- 
2.1.0

chhitz

2014-10-17 15:25

reporter  

0014-wpg-remove-unused-m_binaryId.patch (1,180 bytes)   
From 266c3058c165a7fa750131de7b5fe40a3dde3516 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:11:29 +0200
Subject: [PATCH 14/17] wpg: remove unused m_binaryId

---
 scribus/third_party/wpg/WPG2Parser.cpp | 3 +--
 scribus/third_party/wpg/WPG2Parser.h   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/scribus/third_party/wpg/WPG2Parser.cpp b/scribus/third_party/wpg/WPG2Parser.cpp
index 9c731be..c9d5108 100644
--- a/scribus/third_party/wpg/WPG2Parser.cpp
+++ b/scribus/third_party/wpg/WPG2Parser.cpp
@@ -230,8 +230,7 @@ WPG2Parser::WPG2Parser(WPXInputStream *input, libwpg::WPGPaintInterface* painter
 	m_bitmap(),
 	m_binaryData(),
 	m_hFlipped(false),
-	m_vFlipped(false),
-	m_binaryId(0)
+	m_vFlipped(false)
 {
 }
 
diff --git a/scribus/third_party/wpg/WPG2Parser.h b/scribus/third_party/wpg/WPG2Parser.h
index c09bb71..6f05141 100644
--- a/scribus/third_party/wpg/WPG2Parser.h
+++ b/scribus/third_party/wpg/WPG2Parser.h
@@ -225,7 +225,6 @@ private:
 
 	class ObjectCharacterization;
 	void parseCharacterization(ObjectCharacterization*);
-	unsigned m_binaryId;
 };
 
 #endif // __WPG2PARSER_H__
-- 
2.1.0

chhitz

2014-10-17 15:25

reporter  

0015-wpg-WPGHeader-comment-unused-fields.patch (2,363 bytes)   
From cefbc530bdaaf3d6169043016a6dcbdb319c1f7b Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:12:01 +0200
Subject: [PATCH 15/17] wpg: WPGHeader: comment unused fields

---
 scribus/third_party/wpg/WPGHeader.cpp | 12 ++++++------
 scribus/third_party/wpg/WPGHeader.h   | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/scribus/third_party/wpg/WPGHeader.cpp b/scribus/third_party/wpg/WPGHeader.cpp
index dc36e54..215064d 100644
--- a/scribus/third_party/wpg/WPGHeader.cpp
+++ b/scribus/third_party/wpg/WPGHeader.cpp
@@ -50,12 +50,12 @@ WPGHeader::WPGHeader() :
     m_majorVersion(0x02),
     m_minorVersion(0x00),
     m_encryptionKey(0x00),
-    m_startOfPacketData(0),
-    m_entryCount(0),
-    m_resourceComplete(0),
-    m_encryptionBlockOffset(0),
-    m_fileSize(0),
-    m_encryptVersion(0)
+    m_startOfPacketData(0)//,
+//    m_entryCount(0),
+//    m_resourceComplete(0),
+//    m_encryptionBlockOffset(0),
+//    m_fileSize(0),
+//    m_encryptVersion(0)
 {
     m_identifier[0] = 0xff;
     m_identifier[1] = 'W';
diff --git a/scribus/third_party/wpg/WPGHeader.h b/scribus/third_party/wpg/WPGHeader.h
index 38cbf64..a3283d1 100644
--- a/scribus/third_party/wpg/WPGHeader.h
+++ b/scribus/third_party/wpg/WPGHeader.h
@@ -51,11 +51,11 @@ private:
 	unsigned char m_minorVersion;           // 0 for WPG 8.0 files
 	unsigned int  m_encryptionKey;          // 0 when not encrypted
 	unsigned int  m_startOfPacketData;      // unused, since according to the docs no packets are defined
-	unsigned char m_entryCount;             // number of entries in extension
-	unsigned char m_resourceComplete;       // resource completeness indicator
-	unsigned int  m_encryptionBlockOffset;  // encryption block offset
-	unsigned long m_fileSize;               // size of the entire wpg file
-	unsigned int  m_encryptVersion;         // encryption version information
+//	unsigned char m_entryCount;             // number of entries in extension
+//	unsigned char m_resourceComplete;       // resource completeness indicator
+//	unsigned int  m_encryptionBlockOffset;  // encryption block offset
+//	unsigned long m_fileSize;               // size of the entire wpg file
+//	unsigned int  m_encryptVersion;         // encryption version information
 };
 
 #endif // WPGHEADER
-- 
2.1.0

chhitz

2014-10-17 15:25

reporter  

0016-wpg-WPXInputStream-remove-unused-m_supportsOLE.patch (2,356 bytes)   
From 11f04aab1b969eba245db8731c7bee09030f9acb Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:12:24 +0200
Subject: [PATCH 16/17] wpg: WPXInputStream: remove unused m_supportsOLE

---
 scribus/third_party/wpg/WPGInternalStream.cpp       | 2 +-
 scribus/third_party/wpg/WPGStreamImplementation.cpp | 4 ++--
 scribus/third_party/wpg/WPXStream.h                 | 6 +-----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/scribus/third_party/wpg/WPGInternalStream.cpp b/scribus/third_party/wpg/WPGInternalStream.cpp
index 696aeb8..1613b62 100644
--- a/scribus/third_party/wpg/WPGInternalStream.cpp
+++ b/scribus/third_party/wpg/WPGInternalStream.cpp
@@ -26,7 +26,7 @@
 #include "WPGInternalStream.h"
 
 WPGInternalInputStream::WPGInternalInputStream(const unsigned char *data, const size_t size) :
-	WPXInputStream(false),
+	WPXInputStream(),
 	m_offset(0),
 	m_size(size),
 	m_data(data),
diff --git a/scribus/third_party/wpg/WPGStreamImplementation.cpp b/scribus/third_party/wpg/WPGStreamImplementation.cpp
index 4d783f7..396377a 100644
--- a/scribus/third_party/wpg/WPGStreamImplementation.cpp
+++ b/scribus/third_party/wpg/WPGStreamImplementation.cpp
@@ -98,7 +98,7 @@ WPGMemoryStreamPrivate::~WPGMemoryStreamPrivate()
 }
 
 WPGFileStream::WPGFileStream(const char* filename) :
-	WPXInputStream(true),
+	WPXInputStream(),
 	d(new WPGFileStreamPrivate)
 {
 	d->file.open( filename, std::ios::binary | std::ios::in );
@@ -300,7 +300,7 @@ bool WPGFileStream::isOLEStream()
 }
 
 WPGMemoryStream::WPGMemoryStream(const char *data, const unsigned int dataSize) :
-    WPXInputStream(true),
+    WPXInputStream(),
     d(new WPGMemoryStreamPrivate(std::string(data, dataSize)))
 {
 	d->buffer.seekg( 0, std::ios::end );
diff --git a/scribus/third_party/wpg/WPXStream.h b/scribus/third_party/wpg/WPXStream.h
index 49ef6e7..643169d 100644
--- a/scribus/third_party/wpg/WPXStream.h
+++ b/scribus/third_party/wpg/WPXStream.h
@@ -36,8 +36,7 @@ enum WPX_SEEK_TYPE
 class WPXInputStream
 {
 public:
-	WPXInputStream(bool supportsOLE) :
-		m_supportsOLE(supportsOLE) {}
+	WPXInputStream();
 	virtual ~WPXInputStream() {}
 
 	/**
@@ -84,8 +83,5 @@ public:
 	is beyond its end. In all other cases, it should be false.
 	*/
 	virtual bool atEOS() = 0;
-
-private:
-	bool m_supportsOLE;
 };
 #endif
-- 
2.1.0

chhitz

2014-10-17 15:25

reporter  

0017-pgf-CMacroBlock-remove-unused-variable-m_decoder.patch (2,005 bytes)   
From c2d1cd81c8b7033b655fc7b849c5c2436aa560b6 Mon Sep 17 00:00:00 2001
From: Christian Hitz <christian@klarinett.li>
Date: Fri, 19 Sep 2014 11:14:18 +0200
Subject: [PATCH 17/17] pgf: CMacroBlock: remove unused variable m_decoder

---
 scribus/third_party/pgf/Decoder.cpp | 4 ++--
 scribus/third_party/pgf/Decoder.h   | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/scribus/third_party/pgf/Decoder.cpp b/scribus/third_party/pgf/Decoder.cpp
index 662dc3c..35a442b 100644
--- a/scribus/third_party/pgf/Decoder.cpp
+++ b/scribus/third_party/pgf/Decoder.cpp
@@ -91,10 +91,10 @@ CDecoder::CDecoder(CPGFStream* stream, PGFPreHeader& preHeader, PGFHeader& heade
 
 		// create macro block array
 		m_macroBlocks = new CMacroBlock*[m_macroBlockLen];
-		for (int i=0; i < m_macroBlockLen; i++) m_macroBlocks[i] = new CMacroBlock(this);
+		for (int i=0; i < m_macroBlockLen; i++) m_macroBlocks[i] = new CMacroBlock();
 	} else {
 		m_macroBlocks = 0;
-		m_currentBlock = new CMacroBlock(this);
+		m_currentBlock = new CMacroBlock();
 	}
 
 	// store current stream position
diff --git a/scribus/third_party/pgf/Decoder.h b/scribus/third_party/pgf/Decoder.h
index bb172b1..3b9553b 100644
--- a/scribus/third_party/pgf/Decoder.h
+++ b/scribus/third_party/pgf/Decoder.h
@@ -49,10 +49,9 @@ class CDecoder {
 	/// @brief A macro block is a decoding unit of fixed size (uncoded)
 	class CMacroBlock {
 	public:
-		CMacroBlock(CDecoder *decoder)
+		CMacroBlock()
 		: m_header(0)
         , m_valuePos(0)
-		, m_decoder(decoder)
 		{
 			ASSERT(m_decoder);
 		}
@@ -71,7 +70,6 @@ class CDecoder {
 		void  SetBitAtPos(UINT32 pos, DataT planeMask)			{ (m_value[pos] >= 0) ? m_value[pos] |= planeMask : m_value[pos] -= planeMask; }
 		void  SetSign(UINT32 pos, bool sign)					{ m_value[pos] = -m_value[pos]*sign + m_value[pos]*(!sign); }
 
-		CDecoder *m_decoder;						// outer class
 		bool m_sigFlagVector[BufferSize+1];			// see paper from Malvar, Fast Progressive Wavelet Coder
 	};
 
-- 
2.1.0

Kunda

2014-10-17 15:31

updater   ~0034033

Thanks for your contribution Chitz! Lets see what the reviewers have to say.

JLuc

2014-10-17 22:16

developer   ~0034048

merged with r19590

JLuc

2014-10-17 22:17

developer   ~0034049

oups

jghali

2014-10-17 23:15

administrator   ~0034055

I have applied for now patches 1 to 7 and 10, some with minor modifications (1, 4 and 10). Patch 9 should be tested by someone using Linux first, I'm building on Windows and Windows does not use fontconfig.

Patch 11 fix imo useless clang warning, so currently I'd rather not apply it.
Patch 12 to 17 modify third party library code, so I'd rather not modify that code.

Kunda

2014-10-18 01:37

updater   ~0034057

Jean, I don't think OSX has fontconfig either.

jghali

2014-10-18 13:01

administrator   ~0034059

I have also applied a fix version of patch 11.

jghali

2014-10-18 14:47

administrator   ~0034060

As for patch 08, I tried to fix the issue in a different way.

JLuc

2014-10-18 19:03

developer   ~0034063

About patch 9, what operations should be tested precisely jghali ?

Kunda

2014-10-20 21:27

updater   ~0034075

patch 12 and 17 maybe need to be booted upstream ?

cbradney

2014-10-20 22:08

administrator   ~0034078

patch 9 committed after showing fonts load ok on osx.

Kunda

2014-10-21 02:36

updater   ~0034080

Who wants to be in charge of letting the 3rd party lib maintainers for patches 12-17 about the bug fixes ?

Kunda

2014-10-21 20:00

updater   ~0034096

Patches 12-16 moved to 0012782
Patch 17 moved to 0012783
All other patches committed.
Thanks chhitz, jghali, MrB!

Issue History

Date Modified Username Field Change
2014-10-17 15:23 chhitz New Issue
2014-10-17 15:23 chhitz File Added: 0001-silence-warnings-about-unused-variables.patch
2014-10-17 15:23 chhitz File Added: 0002-silence-warnings-about-uninitialized-variables.patch
2014-10-17 15:23 chhitz File Added: 0003-silence-warnings-about-variables-assigned-to-themsel.patch
2014-10-17 15:23 chhitz File Added: 0004-declare-virtual-destructor-for-base-class.patch
2014-10-17 15:23 chhitz File Added: 0005-synchronize-function-signature-with-Poppler.patch
2014-10-17 15:23 chhitz File Added: 0006-silenc-warnings-about-possible-possible-use-of-unary.patch
2014-10-17 15:23 chhitz File Added: 0007-synchronize-function-signature-with-Qt.patch
2014-10-17 15:24 chhitz File Added: 0008-silence-warnings-about-masking-functions-from-base-c.patch
2014-10-17 15:24 chhitz File Added: 0009-call-FcInitLoadConfigAndFonts-instead-of-declaring-a.patch
2014-10-17 15:24 chhitz File Added: 0010-add-missing-case-Type_CJK.patch
2014-10-17 15:24 chhitz File Added: 0011-silence-warning-about-unused-return-value.patch
2014-10-17 15:24 chhitz File Added: 0012-wpg-size_t-is-unsigned-can-never-be-less-than-0.patch
2014-10-17 15:25 chhitz File Added: 0013-wpg-silence-warning-about-unused-cell-variable.patch
2014-10-17 15:25 chhitz File Added: 0014-wpg-remove-unused-m_binaryId.patch
2014-10-17 15:25 chhitz File Added: 0015-wpg-WPGHeader-comment-unused-fields.patch
2014-10-17 15:25 chhitz File Added: 0016-wpg-WPXInputStream-remove-unused-m_supportsOLE.patch
2014-10-17 15:25 chhitz File Added: 0017-pgf-CMacroBlock-remove-unused-variable-m_decoder.patch
2014-10-17 15:31 Kunda Note Added: 0034033
2014-10-17 22:16 JLuc Note Added: 0034048
2014-10-17 22:16 JLuc Status new => resolved
2014-10-17 22:16 JLuc Resolution open => fixed
2014-10-17 22:16 JLuc Assigned To => JLuc
2014-10-17 22:16 JLuc Status resolved => closed
2014-10-17 22:16 JLuc Assigned To JLuc =>
2014-10-17 22:17 JLuc Assigned To => jghali
2014-10-17 22:17 JLuc Note Added: 0034049
2014-10-17 22:17 JLuc Status closed => feedback
2014-10-17 22:17 JLuc Resolution fixed => reopened
2014-10-17 23:15 jghali Note Added: 0034055
2014-10-17 23:17 jghali Assigned To jghali =>
2014-10-17 23:17 jghali Status feedback => new
2014-10-17 23:17 jghali Resolution reopened => open
2014-10-18 01:37 Kunda Note Added: 0034057
2014-10-18 13:01 jghali Note Added: 0034059
2014-10-18 14:47 jghali Note Added: 0034060
2014-10-18 19:03 JLuc Note Added: 0034063
2014-10-20 21:27 Kunda Note Added: 0034075
2014-10-20 22:08 cbradney Note Added: 0034078
2014-10-21 02:36 Kunda Note Added: 0034080
2014-10-21 19:51 Kunda Issue cloned: 0012782
2014-10-21 19:51 Kunda Relationship added related to 0012782
2014-10-21 19:55 Kunda Relationship added related to 0012783
2014-10-21 20:00 Kunda Note Added: 0034096
2014-10-21 20:00 Kunda Status new => closed
2014-10-21 20:00 Kunda Assigned To => jghali
2014-10-21 20:00 Kunda Resolution open => fixed
2014-10-21 20:00 Kunda Fixed in Version => 1.5.0svn