From 2eb03276f4651ea84c90b66cf3c78f8f3b96fab2 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 11 Mar 2020 22:49:07 +0100 Subject: Fixed unsigned/signed character warnings --- src/markdown.cpp | 8 ++++---- src/util.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index caf77b5..b99db00 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -109,7 +109,7 @@ static Entry *g_current; static QCString g_fileName; static int g_lineNr; static int g_indentLevel=0; // 0 is outside markdown, -1=page level -static const char g_utf8_nbsp[3] = {'\xc2', '\xa0', '\0'}; // UTF-8 nbsp +static const uchar g_utf8_nbsp[3] = { 0xc2, 0xa0, 0}; // UTF-8 nbsp static const char *g_doxy_nsbp = "&_doxy_nbsp;"; // doxygen escape command for UTF-8 nbsp //---------- @@ -1036,7 +1036,7 @@ static void addStrEscapeUtf8Nbsp(GrowBuf &out,const char *s,int len) } else // escape needed -> slow { - out.addStr(substitute(QCString(s).left(len),g_doxy_nsbp,g_utf8_nbsp)); + out.addStr(substitute(QCString(s).left(len),g_doxy_nsbp,(const char *)g_utf8_nbsp)); } } @@ -2487,8 +2487,8 @@ static QCString detab(const QCString &s,int &refIndent) default: // non-whitespace => update minIndent if (c<0 && i=0x80) // multibyte character { if (((uchar)c&0xE0)==0xC0) { @@ -7025,8 +7025,8 @@ int nextUtf8CharPosition(const QCString &utf8Str,uint len,uint startPos) { int bytes=1; if (startPos>=len) return len; - char c = utf8Str[startPos]; - if (c<0) // multibyte utf-8 character + uchar c = (uchar)utf8Str[startPos]; + if (c>=0x80) // multibyte utf-8 character { if (((uchar)c&0xE0)==0xC0) { -- cgit v0.12