From 522337b2104373a911d15e1abd86ab71ec6e6690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 12 Apr 2015 14:00:15 +0200 Subject: parse_kconfig fix some warnings --- scripts/parse_kconfig/symlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/parse_kconfig') diff --git a/scripts/parse_kconfig/symlist.c b/scripts/parse_kconfig/symlist.c index 6435541..072ffe0 100644 --- a/scripts/parse_kconfig/symlist.c +++ b/scripts/parse_kconfig/symlist.c @@ -15,7 +15,7 @@ void symlist_add(struct symlist *sl, char *name) { sl->array = realloc(sl->array, sl->size * sizeof(struct symlist_el)); } - sl->array[sl->pos].id = sl->pos + 1; + sl->array[sl->pos].id = (unsigned)sl->pos + 1; sl->array[sl->pos].name = name; sl->array[sl->pos].be = NULL; sl->pos++; @@ -23,7 +23,7 @@ void symlist_add(struct symlist *sl, char *name) { // TODO faster implementation? Maybe binary search tree? struct symlist_el *symlist_find(struct symlist *sl, char *name) { - int i = 0; + size_t i = 0; while (i < sl->pos) { if (!strcmp(name, sl->array[i].name)) return &sl->array[i]; @@ -33,7 +33,7 @@ struct symlist_el *symlist_find(struct symlist *sl, char *name) { } void symlist_print(struct symlist *sl) { - int i; + size_t i; for (i = 0; i < sl->pos; i++) { printf("%d:%s\n", sl->array[i].id, sl->array[i].name); if (sl->array[i].be != NULL) { -- cgit v1.2.3