Cast int to size_t, enclose function with ifdef 94/269494/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_unified tizen tizen_7.0 tizen_7.0_hotfix tizen_8.0 accepted/tizen/7.0/unified/20221110.061651 accepted/tizen/7.0/unified/hotfix/20221116.105823 accepted/tizen/8.0/unified/20231005.093900 accepted/tizen/unified/20220124.125225 submit/tizen/20220117.074530 tizen_7.0_m2_release tizen_8.0_m2_release
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 17 Jan 2022 05:12:39 +0000 (14:12 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 17 Jan 2022 05:12:39 +0000 (14:12 +0900)
Change-Id: I16c69488fea2acdd9e1fff1eba903ae4c40a3522
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/parser.c
src/toolbox.c

index ff480b6..b523c2e 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 4db0e9a..8f78a9f 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
 
 /*======================================================================*/