diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-12 14:00:15 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-12 14:00:15 +0200 |
commit | 522337b2104373a911d15e1abd86ab71ec6e6690 (patch) | |
tree | b7f8a70ca71417df6d7bc45aafae6abee4ed81e0 /scripts | |
parent | 50a7aa6fb34dca587f487289b35feba392ff5b6b (diff) | |
download | linux-conf-perf-522337b2104373a911d15e1abd86ab71ec6e6690.tar.gz linux-conf-perf-522337b2104373a911d15e1abd86ab71ec6e6690.tar.bz2 linux-conf-perf-522337b2104373a911d15e1abd86ab71ec6e6690.zip |
parse_kconfig fix some warnings
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/parse_kconfig/symlist.c | 6 |
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) { |