]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
fix warnings to allow compiling with -O3
authorWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 15:58:08 +0000 (17:58 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Wed, 17 Apr 2013 15:58:08 +0000 (17:58 +0200)
utf8.c

diff --git a/utf8.c b/utf8.c
index 209317b03c38760a94cbbe9443803d48dd45c828..a10a11aaa8cab039b6efda1a2b4ed457f0c733eb 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -198,7 +198,7 @@ uchar_t u8_getchar(const char *_s, const char **_end)
 
     if (!u8_analyze(_s, &st, &ln, &ch, 0x10))
         ch = 0;
-    if (_end)
+    else if (_end)
         *_end = _s + st + ln;
     return ch;
 }
@@ -210,7 +210,7 @@ uchar_t u8_getnchar(const char *_s, const char **_end, size_t _maxlen)
 
     if (!u8_analyze(_s, &st, &ln, &ch, _maxlen))
         ch = 0;
-    if (_end)
+    else if (_end)
         *_end = _s + st + ln;
     return ch;
 }