3 * various C4946 reinterpret_cast between related classes
4 * silly C4305 truncation from double to float
5 * C4806: no value of type 'bool' promoted to type 'int'
6 can equal the given constant (real bug?)
7 * C4701: pot. uninitialized variable 'ucs4Character'
9 diff -ru wps.old/src/lib/WPS4.cpp wps/src/lib/WPS4.cpp
10 --- wps.old/src/lib/WPS4.cpp 2012-05-31 14:14:13.000000000 +0200
11 +++ wps/src/lib/WPS4.cpp 2012-10-29 14:13:08.241600000 +0100
16 - WPS4Parser *mnParser = reinterpret_cast<WPS4Parser *>(m_parser);
17 + WPS4Parser *mnParser = dynamic_cast<WPS4Parser *>(m_parser);
18 mnParser->send(m_entry, subDocumentType);
21 diff -ru wps.old/src/lib/WPS4Text.cpp wps/src/lib/WPS4Text.cpp
22 --- wps.old/src/lib/WPS4Text.cpp 2012-05-31 14:14:13.000000000 +0200
23 +++ wps/src/lib/WPS4Text.cpp 2012-10-29 14:22:16.004400000 +0100
25 //! operator<< for font properties
26 std::ostream &operator<<(std::ostream &o, Font const &ft)
28 - o << reinterpret_cast<WPSFont const &>(ft) << ",";
29 + o << dynamic_cast<WPSFont const &>(ft) << ",";
34 WPSEntry ent = m_state->m_dosLinkList[id].m_pos;
36 ent.setId(WPS4TextInternal::Z_DLink);
37 - WPSPosition pos_(Vec2f(),Vec2f(3.0,0.2));
38 + WPSPosition pos_(Vec2f(),Vec2f(3.0f,0.2f));
39 pos_.setRelativePosition(WPSPosition::Paragraph, WPSPosition::XCenter);
40 pos_.m_wrapping = WPSPosition::WNone;
41 WPXPropertyList extras;
43 int underlinePos = libwps::readU8(m_input);
46 - if (!what & 0x20) f << "undFl,";
47 + if (!(what & 0x20)) f << "undFl,";
49 attributes |= WPS_UNDERLINE_BIT;
51 diff -ru wps.old/src/lib/WPS8.cpp wps/src/lib/WPS8.cpp
52 --- wps.old/src/lib/WPS8.cpp 2012-05-31 14:14:13.000000000 +0200
53 +++ wps/src/lib/WPS8.cpp 2012-10-29 14:19:31.206000000 +0100
57 long actPos = m_input->tell();
58 - WPS8Parser *mnParser = reinterpret_cast<WPS8Parser *>(m_parser);
59 + WPS8Parser *mnParser = dynamic_cast<WPS8Parser *>(m_parser);
60 if (type == libwps::DOC_NOTE)
61 mnParser->sendNote(m_input, m_id, m_type == Endnote);
64 uint16_t high_surrogate = 0;
67 - uint32_t ucs4Character;
68 + uint32_t ucs4Character(0);