diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-04-17 16:35:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-04-17 16:35:41 +0200 |
commit | 6269c009ea0c4ef6037e435d8e759db954ed54fe (patch) | |
tree | e753807cab6c8ff12c2239f32dec5f1c53e8d8b1 | |
parent | b4be3f153f2cc0350e8e31f8e64ab8d4082955c5 (diff) |
Fix pointer casting
Change-Id: I813168cbaa99d421886fc27be34efdfd7d97e0d4
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 5bcc3e0fc26d..6b3cd27efa3e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -21,6 +21,7 @@ #include <boost/noncopyable.hpp> #include <boost/scoped_ptr.hpp> +#include <boost/static_assert.hpp> #include <comphelper/string.hxx> #include <tools/solar.h> #include <vcl/vclenum.hxx> @@ -1243,8 +1244,9 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(int nBrcVer, const sal_uInt8* pPar } else if ( nBrcVer == 8 ) { + BOOST_STATIC_ASSERT(sizeof (WW8_BRC) == 4); for( int i = 0; i < 6; ++i ) - aDefBrcs[i] = ((WW8_BRC*)&pParams)[i]; + aDefBrcs[i] = reinterpret_cast<WW8_BRC const *>(pParams)[i]; } else memcpy( aDefBrcs, pParams, sizeof( aDefBrcs ) ); |