@@ -1511,7 +1511,10 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
15111511UChar sourcebuf [STACKBUFLEN ],destbuf [STACKBUFLEN ];
15121512UChar * source ,* dest ;
15131513int buflen ;
1514- size_t result_size ,usize ;
1514+ size_t result_size ;
1515+ #ifdef USE_ASSERT_CHECKING
1516+ size_t usize ;
1517+ #endif
15151518UErrorCode status = U_ZERO_ERROR ;
15161519
15171520if (conv == NULL )
@@ -1558,8 +1561,10 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
15581561// and convert modified utf-16 string back to text
15591562result_size = UCNV_GET_MAX_BYTES_FOR_STRING (buflen ,ucnv_getMaxCharSize (conv ));
15601563result = palloc (result_size );
1561-
1562- usize = ucnv_fromUChars (conv ,result ,result_size ,
1564+ #ifdef USE_ASSERT_CHECKING
1565+ usize =
1566+ #endif
1567+ ucnv_fromUChars (conv ,result ,result_size ,
15631568dest ,buflen ,& status );
15641569
15651570if (U_FAILURE (status ))
@@ -1708,7 +1713,10 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
17081713UChar sourcebuf [STACKBUFLEN ],destbuf [STACKBUFLEN ];
17091714UChar * source ,* dest ;
17101715int buflen ;
1711- size_t result_size ,usize ;
1716+ size_t result_size ;
1717+ #ifdef USE_ASSERT_CHECKING
1718+ size_t usize ;
1719+ #endif
17121720UErrorCode status = U_ZERO_ERROR ;
17131721
17141722if (conv == NULL )
@@ -1755,8 +1763,10 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
17551763// and convert modified utf-16 string back to text
17561764result_size = UCNV_GET_MAX_BYTES_FOR_STRING (buflen ,ucnv_getMaxCharSize (conv ));
17571765result = palloc (result_size );
1758-
1759- usize = ucnv_fromUChars (conv ,result ,result_size ,
1766+ #ifdef USE_ASSERT_CHECKING
1767+ usize =
1768+ #endif
1769+ ucnv_fromUChars (conv ,result ,result_size ,
17601770dest ,buflen ,& status );
17611771
17621772if (U_FAILURE (status ))
@@ -1906,7 +1916,10 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
19061916UChar sourcebuf [STACKBUFLEN ],destbuf [STACKBUFLEN ];
19071917UChar * source ,* dest ;
19081918int buflen ;
1909- size_t result_size ,usize ;
1919+ size_t result_size ;
1920+ #ifdef USE_ASSERT_CHECKING
1921+ size_t usize ;
1922+ #endif
19101923UErrorCode status = U_ZERO_ERROR ;
19111924
19121925if (conv == NULL )
@@ -1953,8 +1966,10 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
19531966// and convert modified utf-16 string back to text
19541967result_size = UCNV_GET_MAX_BYTES_FOR_STRING (buflen ,ucnv_getMaxCharSize (conv ));
19551968result = palloc (result_size );
1956-
1957- usize = ucnv_fromUChars (conv ,result ,result_size ,
1969+ #ifdef USE_ASSERT_CHECKING
1970+ usize =
1971+ #endif
1972+ ucnv_fromUChars (conv ,result ,result_size ,
19581973dest ,buflen ,& status );
19591974
19601975if (U_FAILURE (status ))