summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-15 22:42:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-15 22:42:25 +0100
commit5eea018d806f96e70c42e6d26922bb6a0c35d466 (patch)
tree41728718a5fc725af45dd7524548e959eef066bd /sal/rtl
parent82633cdad36083e537886b832483f4e73263735a (diff)
Clang -Wdangling-else, -Wuninitialized.
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/uri.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sal/rtl/source/uri.cxx b/sal/rtl/source/uri.cxx
index af5da83e785f..2c42abbda7dc 100644
--- a/sal/rtl/source/uri.cxx
+++ b/sal/rtl/source/uri.cxx
@@ -391,7 +391,9 @@ void parseUriRef(rtl_uString const * pUriRef, Components * pComponents)
sal_Unicode const * pPos = pBegin;
if (pPos != pEnd && isAlpha(*pPos))
+ {
for (sal_Unicode const * p = pPos + 1; p != pEnd; ++p)
+ {
if (*p == ':')
{
pComponents->aScheme.pBegin = pBegin;
@@ -401,7 +403,11 @@ void parseUriRef(rtl_uString const * pUriRef, Components * pComponents)
}
else if (!isAlpha(*p) && !isDigit(*p) && *p != '+' && *p != '-'
&& *p != '.')
+ {
break;
+ }
+ }
+ }
if (pEnd - pPos >= 2 && pPos[0] == '/' && pPos[1] == '/')
{