diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-09-10 15:24:37 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-10 15:31:59 +0200 |
commit | fcf415df476c56a7ed4e5fb30e731a263da61e52 (patch) | |
tree | e5015986bc427074f1d46253117c0bea543462a6 | |
parent | 886a299b028aa960c551c7d16583a54a7e1f18a9 (diff) |
libwpd: MSVC warning C4310: cast truncates constant value
Change-Id: Ibd6c7299b612d05d4c00ddfe47b51f45e3ae07d8
-rw-r--r-- | libwpd/UnpackedTarball_wpd.mk | 1 | ||||
-rw-r--r-- | libwpd/libwpd-0.9.4-msvc-warning.patch | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/libwpd/UnpackedTarball_wpd.mk b/libwpd/UnpackedTarball_wpd.mk index fd5269a7a607..1f4253101948 100644 --- a/libwpd/UnpackedTarball_wpd.mk +++ b/libwpd/UnpackedTarball_wpd.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,wpd,$(WPD_TARBALL))) $(eval $(call gb_UnpackedTarball_add_patches,wpd,\ libwpd/libwpd-0.9.4.patch \ libwpd/libwpd-0.9.4-warning.patch \ + libwpd/libwpd-0.9.4-msvc-warning.patch \ )) # libwpd/libwpd-0.9.4-warning.patch: -Werror,-Wunused-private-field diff --git a/libwpd/libwpd-0.9.4-msvc-warning.patch b/libwpd/libwpd-0.9.4-msvc-warning.patch new file mode 100644 index 000000000000..ebe29c748b8f --- /dev/null +++ b/libwpd/libwpd-0.9.4-msvc-warning.patch @@ -0,0 +1,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; |