aboutsummaryrefslogtreecommitdiff
path: root/scripts/parse_kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/parse_kconfig')
-rw-r--r--scripts/parse_kconfig/symlist.c6
1 files changed, 3 insertions, 3 deletions
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) {