diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-10-29 14:49:39 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-29 14:56:04 +0100 |
commit | 573af9266c4d17445f0c75e1a71b629c845b83b8 (patch) | |
tree | bd885869b4dc009cf47910c07818ae45f214e91d /libwps | |
parent | 424bd89ac2a11ba6dd2ede9454c3af90a5ca7f9c (diff) |
libwps: fix gcc warning too [-Wsign-promo]
Change-Id: I23e32cfc100441530691e0dcdc71eac37b3fbf0d
Diffstat (limited to 'libwps')
-rw-r--r-- | libwps/UnpackedTarball_wps.mk | 1 | ||||
-rw-r--r-- | libwps/libwps.gcc.warnings.patch | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libwps/UnpackedTarball_wps.mk b/libwps/UnpackedTarball_wps.mk index 269adf047d28..e5739281306d 100644 --- a/libwps/UnpackedTarball_wps.mk +++ b/libwps/UnpackedTarball_wps.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,wps,1)) $(eval $(call gb_UnpackedTarball_add_patches,wps,\ libwps/libwps.msvc.warnings.patch \ + libwps/libwps.gcc.warnings.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/libwps/libwps.gcc.warnings.patch b/libwps/libwps.gcc.warnings.patch new file mode 100644 index 000000000000..d9692d4b2d93 --- /dev/null +++ b/libwps/libwps.gcc.warnings.patch @@ -0,0 +1,15 @@ +warning: passing ‘libwps::Justification’ chooses ‘int’ over ‘unsigned int’ + +diff -ru wps.old/src/lib/WPSParagraph.cpp wps/src/lib/WPSParagraph.cpp +--- wps.old/src/lib/WPSParagraph.cpp 2012-10-29 14:44:09.135977333 +0100 ++++ wps/src/lib/WPSParagraph.cpp 2012-10-29 14:44:13.649981497 +0100 +@@ -137,7 +137,8 @@ + o << "just=fullAllLines, "; + break; + default: +- o << "just=" << pp.m_justify << ", "; ++ assert(false); // unhandled Justification enum value ++ o << "just=" << static_cast<unsigned>(pp.m_justify) << ", "; + break; + } + |