summaryrefslogtreecommitdiff
path: root/i18npool
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-25 20:05:19 +0200
commit62be589df821687b36188e977b163fd58599c9ff (patch)
tree0ff2d89eb107b65dd11bf6b65f14eeadf2c4e61a /i18npool
parent70e4c65058a76131235cd04b64231c403cbe74f3 (diff)
Don't ignore GCC warnings for static builds
Instead simply (and correctly) test the function pointers in the static build case. Change-Id: I01b3397f40671464b1d2cb472447d8530b996d21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116117 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'i18npool')
-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;
}