diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-04-01 15:40:20 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-04-01 15:42:12 +0200 |
commit | eebf0cf9b356151c9b0863f4007e38b682971297 (patch) | |
tree | 37c6e260a1b6b4857ef63365362e0a2eb25e1bfa | |
parent | 1bb5b6cc83f18e668c486f9207e5d6fb6f31961c (diff) |
Silence some unreachable code warnings
-rw-r--r-- | libwpd/libwpd.warnings.patch | 32 | ||||
-rw-r--r-- | libwpd/makefile.mk | 3 |
2 files changed, 34 insertions, 1 deletions
diff --git a/libwpd/libwpd.warnings.patch b/libwpd/libwpd.warnings.patch new file mode 100644 index 0000000..ebc86dc --- /dev/null +++ b/libwpd/libwpd.warnings.patch @@ -0,0 +1,32 @@ +--- misc/libwpd-0.9.1/src/lib/libwpd_internal.cpp ++++ misc/build/libwpd-0.9.1/src/lib/libwpd_internal.cpp +@@ -998,21 +998,25 @@ _WPXColumnProperties::_WPXColumnProperties() + // HACK: this function is really cheesey + int _extractNumericValueFromRoman(const char romanChar) + { ++ int retValue = 0; + switch (romanChar) + { + case 'I': + case 'i': +- return 1; ++ retValue = 1; ++ break; + case 'V': + case 'v': +- return 5; ++ retValue = 5; ++ break; + case 'X': + case 'x': +- return 10; ++ retValue = 10; ++ break; + default: + throw ParseException(); + } +- return 1; ++ return retValue; + } + + // _extractDisplayReferenceNumberFromBuf: given a nuWP6_DEFAULT_FONT_SIZEmber string in UCS2 represented diff --git a/libwpd/makefile.mk b/libwpd/makefile.mk index 717facb..6ecbbfa 100644 --- a/libwpd/makefile.mk +++ b/libwpd/makefile.mk @@ -44,7 +44,8 @@ TARGET=wpd TARFILE_NAME=libwpd-0.9.1 TARFILE_MD5=5ff846847dab351604ad859e2fd4ed3c PATCH_FILES=libwpd.gcc460.patch \ - libwpd.corruptedprefix.patch + libwpd.corruptedprefix.patch \ + libwpd.warnings.patch BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) BUILD_DIR=src$/lib |