From ccc5ea08d64c38a9ce925d448c3010aca19ed35c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Oct 2015 07:45:01 +0200 Subject: cppcheck:variableScope Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/osl/unx/nlsupport.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sal/osl/unx/nlsupport.cxx') diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index 0f6d28c2f8c7..6a322d8ec708 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -789,7 +789,6 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale ) { const _pair *language = 0; char locale_buf[64] = ""; - char *cp; /* default to process locale if pLocale == NULL */ if( NULL == pLocale ) @@ -808,7 +807,7 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale ) * e.g. de.ISO8859-15 or de.ISO8859-15@euro which strongly indicates what * charset to use */ - cp = strrchr( locale_buf, '.' ); + char* cp = strrchr( locale_buf, '.' ); if( NULL != cp ) { -- cgit