From e0c40b71a9e1dcf6f17a6c2ff1d403e7dca46d8b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 3 Oct 2011 16:44:30 +0300 Subject: WaE: possible loss of data, assignment within conditional expression --- .../source/defaultnumberingprovider/defaultnumberingprovider.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'i18npool/source') diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index a082b026f0ad..4541048b45c7 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -404,7 +404,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult ) throw( IllegalArgumentException, RuntimeException ) { OUStringBuffer aTemp(64); - unsigned char nDigit; + unsigned int nDigit; sal_Unicode asPersianWord_conjunction_data[] = {0x20,0x0648,0x20,0}; OUString asPersianWord_conjunction( asPersianWord_conjunction_data ); unsigned char nSection = 0; @@ -426,13 +426,13 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult ) } else { - if ((nDigit = nPart % 10)) + if ((nDigit = nPart % 10) != 0) { if (aTemp.getLength()) aTemp.insert( 0, asPersianWord_conjunction); aTemp.insert( 0, table_PersianWord_decade1[nDigit]); } - if ((nDigit = (nPart / 10) % 10)) + if ((nDigit = (nPart / 10) % 10) != 0) { if (aTemp.getLength()) aTemp.insert( 0, asPersianWord_conjunction); @@ -440,7 +440,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult ) } } - if ((nDigit = nPart / 100)) + if ((nDigit = nPart / 100) != 0) { if (aTemp.getLength()) aTemp.insert( 0, asPersianWord_conjunction); -- cgit