From: SangYoun Kwak Date: Mon, 17 Jan 2022 05:12:39 +0000 (+0900) Subject: Cast int to size_t, enclose function with ifdef X-Git-Tag: submit/tizen/20220117.074530^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_8.0_unified;p=platform%2Fcore%2Fsystem%2Ftizen-platform-config.git Cast int to size_t, enclose function with ifdef Change-Id: I16c69488fea2acdd9e1fff1eba903ae4c40a3522 Signed-off-by: SangYoun Kwak --- diff --git a/src/parser.c b/src/parser.c index ff480b6..b523c2e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -293,7 +293,7 @@ void parse_utf8_info( pos = length; /* search the begin of the line */ - while ((end - buf) != pos) { + while ((size_t)(end - buf) != pos) { /* dealing utf8 */ colno += ((*end & '\xc0') != '\x80'); /* dealing with lines */ @@ -305,7 +305,7 @@ void parse_utf8_info( } /* search the end of the line */ - while ((end - buf) < length && *end != '\n') + while (((size_t)(end - buf) < length) && (*end != '\n')) end++; /* record computed values */ diff --git a/src/toolbox.c b/src/toolbox.c index 4db0e9a..8f78a9f 100644 --- a/src/toolbox.c +++ b/src/toolbox.c @@ -494,6 +494,7 @@ static int keycmp(const void *a, const void *b) } /* sort the keys and return their count */ +#ifdef SORT_KEYS static int sortkeys() { struct key *key = keys, **array; @@ -527,6 +528,7 @@ static int sortkeys() return count; } +#endif /*======================================================================*/