summaryrefslogtreecommitdiff
path: root/libwpd/libwpd-0.9.4-msvc-warning.patch
blob: ebe29c748b8f266a15872a3c46fc7e0e77ee5fff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
MSVC warning C4310: cast truncates constant value

diff -ru foo/UnpackedTarball/wpd/src/lib/WP3PageFormatGroup.cpp wpd_fix/src/lib/WP3PageFormatGroup.cpp
--- foo/UnpackedTarball/wpd/src/lib/WP3PageFormatGroup.cpp	2011-10-28 15:37:47.000000000 +0200
+++ foo/UnpackedTarball/wpd_fix/src/lib/WP3PageFormatGroup.cpp	2012-09-10 15:09:06.222400000 +0200
@@ -56,6 +56,7 @@
 {
 	// this group can contain different kinds of data, thus we need to read
 	// the contents accordingly
+	uint8_t tmpTmp = 0xff;
 	int8_t tmpTabType = 0;
 	double tmpTabPosition = 0.0;
 	WPXTabStop tmpTabStop = WPXTabStop();
@@ -93,8 +94,9 @@
 
 		m_isRelative = (readU8(input, encryption) & 0x01);
 
-		while ((tmpTabType = (int8_t)readU8(input, encryption))  != (int8_t)0xff)
+		while ((tmpTmp = readU8(input, encryption)) != 0xff)
 		{
+			tmpTabType = (int8_t) tmpTmp;
 			if (input->atEOS())
 				throw FileException();
 			tmpTabPosition = fixedPointToDouble(readU32(input, encryption, true)) / 72.0;