r22416 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 26 18:43:58 UTC 2018


Author: jghali
Date: Mon Feb 26 18:43:58 2018
New Revision: 22416

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22416
Log:
fix gcc warning related to sprintf format specifier

Modified:
    trunk/Scribus/scribus/fonts/ftface.cpp
    trunk/Scribus/scribus/fonts/scface_ttf.cpp

Modified: trunk/Scribus/scribus/fonts/ftface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22416&path=/trunk/Scribus/scribus/fonts/ftface.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/ftface.cpp	(original)
+++ trunk/Scribus/scribus/fonts/ftface.cpp	Mon Feb 26 18:43:58 2018
@@ -346,7 +346,7 @@
 			glEncoding.glyphName = adobeGlyphName(charcode);
 		else
 			glEncoding.glyphName = QString(reinterpret_cast<char*>(buf));
-		glEncoding.toUnicode = QString().sprintf("%04X", charcode);
+		glEncoding.toUnicode = QString().sprintf("%04lX", charcode);
 		GList.insert(gindex, glEncoding);
 
 		charcode = FT_Get_Next_Char(face, charcode, &gindex );
@@ -379,7 +379,7 @@
 		ScFace::GlyphEncoding glEncoding;
 		glEncoding.charcode  = static_cast<ScFace::ucs4_type>(charcode);
 		glEncoding.glyphName = glyphname;
-		glEncoding.toUnicode = QString().sprintf("%04X", charcode);
+		glEncoding.toUnicode = QString().sprintf("%04lX", charcode);
 		if ((charcode == 0) && glyphname.startsWith("uni"))
 		{
 			QString uniHexStr = uniGlyphNameToUnicode(glyphname);

Modified: trunk/Scribus/scribus/fonts/scface_ttf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22416&path=/trunk/Scribus/scribus/fonts/scface_ttf.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface_ttf.cpp	(original)
+++ trunk/Scribus/scribus/fonts/scface_ttf.cpp	Mon Feb 26 18:43:58 2018
@@ -94,7 +94,7 @@
 		ScFace::GlyphEncoding glEncoding;
 		glEncoding.charcode  = charcode;
 		glEncoding.glyphName = adobeGlyphName(charcode);
-		glEncoding.toUnicode = QString().sprintf("%04X", charcode);
+		glEncoding.toUnicode = QString().sprintf("%04lX", charcode);
 		GList.insert(gindex, glEncoding);
 		charcode = FT_Get_Next_Char(face, charcode, &gindex );
 	}




More information about the scribus-commit mailing list