Cast int to size_t, enclose function with ifdef 01/269501/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20220124.125524 submit/tizen_6.5/20220117.075921
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 17 Jan 2022 05:12:39 +0000 (14:12 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 17 Jan 2022 07:27:10 +0000 (07:27 +0000)
Change-Id: I16c69488fea2acdd9e1fff1eba903ae4c40a3522
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
(cherry picked from commit 730d4821d89fa8fc20b490384c3b327ca38d7bc9)

src/parser.c
src/toolbox.c

index ff480b65e1fd1f9e58b77862603a54b1957e95a3..b523c2ebba2edab6d2bcf83ff2dec7d61d897544 100644 (file)
@@ -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 */
index 4db0e9a8d1e6ddf9990ec099427c27883762ff66..8f78a9f6ba4834defdbba000556b675846b1719e 100644 (file)
@@ -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
 
 /*======================================================================*/