Fix build with clang.
This commit is contained in:
parent
9822231d2f
commit
65dd1ccbc9
4 changed files with 52 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
$NetBSD: distinfo,v 1.3 2011/02/04 19:56:26 adam Exp $
|
$NetBSD: distinfo,v 1.4 2012/03/28 15:16:34 wiz Exp $
|
||||||
|
|
||||||
SHA1 (libwpg-0.2.0.tar.bz2) = 34a692566bda66488f83c635774d1bd92cee0fdf
|
SHA1 (libwpg-0.2.0.tar.bz2) = 34a692566bda66488f83c635774d1bd92cee0fdf
|
||||||
RMD160 (libwpg-0.2.0.tar.bz2) = 0169a85c75040dd96b03702c5d2cd67dfded6d1f
|
RMD160 (libwpg-0.2.0.tar.bz2) = 0169a85c75040dd96b03702c5d2cd67dfded6d1f
|
||||||
Size (libwpg-0.2.0.tar.bz2) = 326684 bytes
|
Size (libwpg-0.2.0.tar.bz2) = 326684 bytes
|
||||||
|
SHA1 (patch-src_lib_WPG2Parser.cpp) = 13d38364aca904afa7a00712c6d89311dcb4b4b0
|
||||||
|
|
34
converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp
Normal file
34
converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
$NetBSD: patch-src_lib_WPG2Parser.cpp,v 1.1 2012/03/28 15:16:35 wiz Exp $
|
||||||
|
|
||||||
|
Fix clang warning
|
||||||
|
error: operator '?:' has lower precedence than '-'; '-' will be evaluated first [-Werror,-Wparentheses]
|
||||||
|
|
||||||
|
--- src/lib/WPG2Parser.cpp.orig 2010-11-09 08:36:36.000000000 +0000
|
||||||
|
+++ src/lib/WPG2Parser.cpp
|
||||||
|
@@ -783,7 +783,7 @@ void WPG2Parser::handleDPPenForeColor()
|
||||||
|
unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
+ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8();
|
||||||
|
|
||||||
|
m_style.insert("svg:stroke-color", libwpg::WPGColor(red, green, blue, alpha).getColorString());
|
||||||
|
m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), WPX_PERCENT);
|
||||||
|
@@ -1106,7 +1106,7 @@ void WPG2Parser::handleDPBrushForeColor(
|
||||||
|
unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
+ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8();
|
||||||
|
WPG_DEBUG_MSG((" Foreground color (RGBA): %d %d %d %d\n", red, green, blue, alpha));
|
||||||
|
|
||||||
|
m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha);
|
||||||
|
@@ -1131,7 +1131,7 @@ void WPG2Parser::handleDPBrushForeColor(
|
||||||
|
unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8();
|
||||||
|
+ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8();
|
||||||
|
libwpg::WPGColor color(red, green, blue, alpha);
|
||||||
|
colors.push_back(color);
|
||||||
|
WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha));
|
|
@ -1,8 +1,8 @@
|
||||||
$NetBSD: distinfo,v 1.5 2012/02/16 18:04:08 hans Exp $
|
$NetBSD: distinfo,v 1.6 2012/03/28 15:17:19 wiz Exp $
|
||||||
|
|
||||||
SHA1 (libwps-0.2.2.tar.bz2) = d8c126cb5601afaaaf14507fc09990f8ca41b301
|
SHA1 (libwps-0.2.2.tar.bz2) = d8c126cb5601afaaaf14507fc09990f8ca41b301
|
||||||
RMD160 (libwps-0.2.2.tar.bz2) = 72aff204a2a386ade5b7d5a6cede4c75f1929eb5
|
RMD160 (libwps-0.2.2.tar.bz2) = 72aff204a2a386ade5b7d5a6cede4c75f1929eb5
|
||||||
Size (libwps-0.2.2.tar.bz2) = 295486 bytes
|
Size (libwps-0.2.2.tar.bz2) = 295486 bytes
|
||||||
SHA1 (patch-aa) = 5dd49b6bcb8c147409aa7192f365e9ab0a459ffb
|
SHA1 (patch-aa) = 5dd49b6bcb8c147409aa7192f365e9ab0a459ffb
|
||||||
SHA1 (patch-src_lib_WPS4.cpp) = e39061f971199f4efe3e80793ac16aec98ba547c
|
SHA1 (patch-src_lib_WPS4.cpp) = e39061f971199f4efe3e80793ac16aec98ba547c
|
||||||
SHA1 (patch-src_lib_WPS8.cpp) = 63a5124844c8fc08f98f913f3a375570f1083db0
|
SHA1 (patch-src_lib_WPS8.cpp) = c3326fb46884fe5b5ba28f4fe75861b0e3ef35a4
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
$NetBSD: patch-src_lib_WPS8.cpp,v 1.2 2012/02/16 18:04:08 hans Exp $
|
$NetBSD: patch-src_lib_WPS8.cpp,v 1.3 2012/03/28 15:17:19 wiz Exp $
|
||||||
|
|
||||||
--- src/lib/WPS8.cpp.orig 2011-02-04 20:04:48.000000000 +0000
|
3rd chunk: fix clang error: expression result unused [-Werror,-Wunused-value]
|
||||||
|
|
||||||
|
--- src/lib/WPS8.cpp.orig 2011-05-03 13:00:13.000000000 +0000
|
||||||
+++ src/lib/WPS8.cpp
|
+++ src/lib/WPS8.cpp
|
||||||
@@ -159,7 +159,7 @@ void WPS8Parser::readStreams(WPXInputStr
|
@@ -159,7 +159,7 @@ void WPS8Parser::readStreams(WPXInputStr
|
||||||
|
|
||||||
|
@ -20,7 +22,16 @@ $NetBSD: patch-src_lib_WPS8.cpp,v 1.2 2012/02/16 18:04:08 hans Exp $
|
||||||
type = readU32(input);
|
type = readU32(input);
|
||||||
} else input->seek(len-2,WPX_SEEK_CUR);
|
} else input->seek(len-2,WPX_SEEK_CUR);
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ void WPS8Parser::appendUTF16LE(WPXInputS
|
@@ -196,8 +196,6 @@ void WPS8Parser::readNotes(std::vector<W
|
||||||
|
if (headerIndexTable.end() == pos)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- pos->second.length;
|
||||||
|
-
|
||||||
|
uint32_t unk1;
|
||||||
|
uint32_t count;
|
||||||
|
uint32_t boff;
|
||||||
|
@@ -251,7 +249,7 @@ void WPS8Parser::appendUTF16LE(WPXInputS
|
||||||
uint16_t high_surrogate = 0;
|
uint16_t high_surrogate = 0;
|
||||||
bool fail = false;
|
bool fail = false;
|
||||||
uint16_t readVal;
|
uint16_t readVal;
|
||||||
|
|
Loading…
Reference in a new issue