summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-05-17 16:53:31 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-05-24 17:47:49 +0200
commit1389820841474f2e4e0f5e337d461b90a4d1531e (patch)
treee247d01c63221f297eb87bbb028a684a76b5e655
parentInstall GDB pretty printers into cross-toolset (diff)
downloadcore-1389820841474f2e4e0f5e337d461b90a4d1531e.tar.gz
core-1389820841474f2e4e0f5e337d461b90a4d1531e.zip
Don't ignore GCC warnings for static builds
Instead simply (and correctly) test the function pointers in the static build case. Change-Id: I01b3397f40671464b1d2cb472447d8530b996d21
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index d57495a546f1..e03286b772d7 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -105,7 +105,6 @@ static sal_Int16 checkScriptType(sal_Unicode c)
}
#ifdef DISABLE_DYNLOADING
-
extern "C" {
const sal_Unicode* getHangul2HanjaData();
@@ -115,7 +114,6 @@ const sal_uInt16* getHanja2HangulIndex();
const sal_Unicode* getHanja2HangulData();
}
-
#endif
Sequence< OUString >
@@ -129,15 +127,12 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
sal_Int16 (*getHangul2HanjaIndexCount)() = reinterpret_cast<sal_Int16 (*)()>(getFunctionBySymbol("getHangul2HanjaIndexCount"));
const sal_uInt16* (*getHanja2HangulIndex)() = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getHanja2HangulIndex"));
const sal_Unicode* (*getHanja2HangulData)() = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getHanja2HangulData"));
+
+ if (toHanja && getHangul2HanjaIndex && getHangul2HanjaIndexCount && getHangul2HanjaData)
#else
-#pragma GCC diagnostic push
-#ifdef __clang__
-#pragma GCC diagnostic warning "-Wbool-conversions"
-#else
-#pragma GCC diagnostic warning "-Waddress"
-#endif
+ if (toHanja)
#endif
- if (toHanja && getHangul2HanjaIndex && getHangul2HanjaIndexCount && getHangul2HanjaData) {
+ {
ch = aText[nStartPos];
const Hangul_Index *Hangul_ko = getHangul2HanjaIndex();
sal_Int16 top = getHangul2HanjaIndexCount();
@@ -160,7 +155,12 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
break;
}
}
- } else if (! toHanja && getHanja2HangulIndex && getHanja2HangulData)
+ }
+#ifndef DISABLE_DYNLOADING
+ else if (!toHanja && getHanja2HangulIndex && getHanja2HangulData)
+#else
+ else if (!toHanja)
+#endif
{
std::unique_ptr<sal_Unicode[]> newStr(new sal_Unicode[nLength+1]);
sal_Int32 count = 0;
@@ -182,9 +182,6 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
output[0] = OUString(newStr.get(), count);
}
}
-#if defined(DISABLE_DYNLOADING)
-#pragma GCC diagnostic pop
-#endif
return output;
}