aboutsummaryrefslogtreecommitdiffstats
path: root/fsa
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-22 09:58:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-22 20:37:24 +0000
commit57d1ac2ffd647ec7b2097fd5a2fe3cee6623ef8a (patch)
tree23bebb59212b682c5d68526c4890b62e69afc4a5 /fsa
parent2e747ea9504fdee687ce6641f0203a2604290fdb (diff)
Avoid uninitialized error when compiling with -Og
Diffstat (limited to 'fsa')
-rw-r--r--fsa/src/vespa/fsa/unicode.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/fsa/src/vespa/fsa/unicode.cpp b/fsa/src/vespa/fsa/unicode.cpp
index ee0cdad1766..48569c410a7 100644
--- a/fsa/src/vespa/fsa/unicode.cpp
+++ b/fsa/src/vespa/fsa/unicode.cpp
@@ -57,14 +57,10 @@ char* Unicode::utf8copy(char *dst, const ucs4_t *src)
char* Unicode::utf8ncopy(char *dst, const ucs4_t *src,
int maxdst, int maxsrc)
{
- ucs4_t i;
- char *p;
- char *edst;
- const ucs4_t *esrc;
-
- p = dst;
- edst = dst + maxdst;
- esrc = src + maxsrc;
+ ucs4_t i = 0;
+ char * p = dst;
+ char * edst = dst + maxdst;
+ const ucs4_t * esrc = src + maxsrc;
while (src < esrc && (i = *src++) != 0 && p < edst) {
if (i < 128)