From 5901827bd44dc3600bf66c83882e6847439d59d6 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 17 Jan 2015 00:37:31 +0100 Subject: fdo#39440 reduce scope of local variables This addresses some cppcheck warnings. Change-Id: I1cd8b118e2598b8b18fb445851a3bb41e554267b Reviewed-on: https://gerrit.libreoffice.org/13967 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unoxml/source/xpath/xpathapi.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'unoxml/source') diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index a7346b9042bc..915d6660d53d 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -126,13 +126,12 @@ namespace XPath { nsmap_t::const_iterator i = nsmap.begin(); OString oprefix, ouri; - xmlChar *p, *u; while (i != nsmap.end()) { oprefix = OUStringToOString(i->first, RTL_TEXTENCODING_UTF8); ouri = OUStringToOString(i->second, RTL_TEXTENCODING_UTF8); - p = (xmlChar*)oprefix.getStr(); - u = (xmlChar*)ouri.getStr(); + xmlChar *p = (xmlChar*)oprefix.getStr(); + xmlChar *u = (xmlChar*)ouri.getStr(); xmlXPathRegisterNs(ctx, p, u); ++i; } -- cgit