diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-04-02 16:56:13 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-02 16:58:13 +0200 |
commit | 1cdb1ea6a8071f9cd802c30ae78a35332782cb31 (patch) | |
tree | 3bd133822d738bf8722dcf4cfacd36e4978ab3b1 /i18npool/source/isolang | |
parent | 60b596665fff7c110c6b12da192f5712fb145028 (diff) |
don't use string literals with embedded \0's
Followup to 791f27683311e487947b0464a0cb132b19fd0e12.
Diffstat (limited to 'i18npool/source/isolang')
-rw-r--r-- | i18npool/source/isolang/isolang.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 5e404875bd62..35a92506a03f 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -659,9 +659,9 @@ void MsLangId::convertLanguageToIsoNames( LanguageType nLang, do { if ( pEntry->mnLang == nLang ) - { - rLangStr = rtl::OString( pEntry->maLangStr ); - rCountry = rtl::OString( pEntry->maCountry ); + { // avoid embedded \0 warning + rLangStr = rtl::OString( static_cast< const char* >( pEntry->maLangStr )); + rCountry = rtl::OString( static_cast< const char* >( pEntry->maCountry )); return; } ++pEntry; @@ -675,9 +675,9 @@ void MsLangId::convertLanguageToIsoNames( LanguageType nLang, do { if ( pNoneStdEntry->mnLang == nLang ) - { - rLangStr = rtl::OString( pNoneStdEntry->maLangStr ); - rCountry = rtl::OString( pNoneStdEntry->maCountry ); + { // avoid embedded \0 warning + rLangStr = rtl::OString( static_cast< const char* >( pNoneStdEntry->maLangStr )); + rCountry = rtl::OString( static_cast< const char* >( pNoneStdEntry->maCountry )); return; } ++pNoneStdEntry; @@ -1082,12 +1082,12 @@ LanguageType MsLangId::convertUnxByteStringToLanguage( rtl::OString aUpperCountry = aCountry.toAsciiUpperCase(); const IsoLangGLIBCModifiersEntry* pGLIBCModifiersEntry = aImplIsoLangGLIBCModifiersEntries; do - { - if (( aLowerLang.equals( pGLIBCModifiersEntry->maLangStr ) ) && - ( aAtString.equals( pGLIBCModifiersEntry->maAtString ) )) + { // avoid embedded \0 warning + if (( aLowerLang.equals( static_cast< const char* >( pGLIBCModifiersEntry->maLangStr ))) && + ( aAtString.equals( static_cast< const char* >( pGLIBCModifiersEntry->maAtString )))) { if ( aUpperCountry.isEmpty() || - aUpperCountry.equals( pGLIBCModifiersEntry->maCountry ) ) + aUpperCountry.equals( static_cast< const char* >( pGLIBCModifiersEntry->maCountry ))) { return pGLIBCModifiersEntry->mnLang; } |