From 19942c13956efdf9f284eb42a61bdf552dc17a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 24 Jan 2011 15:35:58 +0000 Subject: [PATCH] g++ 4.6.0 hates us --- libwpd-gcc4.6.0.patch | 39 +++++++++++++++++++++++++++++++++++++++ libwpd.spec | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 libwpd-gcc4.6.0.patch diff --git a/libwpd-gcc4.6.0.patch b/libwpd-gcc4.6.0.patch new file mode 100644 index 0000000..b704e96 --- /dev/null +++ b/libwpd-gcc4.6.0.patch @@ -0,0 +1,39 @@ +diff -ru libwpd-0.9.1.orig/src/lib/WP5GraphicsInformationPacket.h libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h +--- libwpd-0.9.1.orig/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 15:28:41.076826132 +0000 ++++ libwpd-0.9.1/src/lib/WP5GraphicsInformationPacket.h 2011-01-24 15:29:03.844815512 +0000 +@@ -37,7 +37,7 @@ + ~WP5GraphicsInformationPacket(); + void _readContents(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataSize); + const std::vector &getImages() const { return m_images; } +- const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return NULL; } ++ const WPXBinaryData *getImage( unsigned long imageIndex ) const { if (imageIndex < m_images.size()) return m_images[imageIndex]; return 0; } + + private: + std::vector m_images; +diff -ru libwpd-0.9.1.orig/src/lib/WPXOLEStream.cpp libwpd-0.9.1/src/lib/WPXOLEStream.cpp +--- libwpd-0.9.1.orig/src/lib/WPXOLEStream.cpp 2011-01-24 15:28:41.072826662 +0000 ++++ libwpd-0.9.1/src/lib/WPXOLEStream.cpp 2011-01-24 15:31:05.093831190 +0000 +@@ -599,9 +599,6 @@ + { + unsigned p = i * 128; + +- // would be < 32 if first char in the name isn't printable +- unsigned prefix = 32; +- + // parse name of this entry, which stored as Unicode 16-bit + std::string name; + int name_len = readU16( buffer + 0x40+p ); +@@ -609,12 +606,10 @@ + for( int j=0; ( buffer[j+p]) && (j= 2.0.0, libgsf-devel >= 1.6.0, cppunit-devel +Patch0: libwpd-gcc4.6.0.patch %description Library that handles Word Perfect documents. @@ -31,6 +32,7 @@ Includes and definitions for developing with libwpd. %prep %setup -q +%patch0 -p1 -b .gcc4.6.0 %build %configure --without-docs --disable-static