Skip to content

Commit

Permalink
Merge pull request #363 from andrey-terekhov/fix-expr
Browse files Browse the repository at this point in the history
Fix conversion from 'item_t' to 'const size_t'
  • Loading branch information
Victor-Y-Fadeev authored Feb 15, 2023
2 parents 1976ee8 + 827a2c4 commit f4c012e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/macro/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ int storage_remove_by_index(storage *const stg, const size_t id)
return 0;
}

map_set_by_index(&stg->as, hash_get_key(&stg->hs, id), ITEM_MAX);
map_set_by_index(&stg->as, (size_t)hash_get_key(&stg->hs, id), ITEM_MAX);
if (hash_get_by_index(&stg->hs, id, 0) == (item_t)strings_size(&stg->vec) - 1)
{
strings_remove(&stg->vec);
Expand All @@ -215,7 +215,7 @@ size_t storage_search(storage *const stg, universal_io *const io)

const char *storage_to_string(const storage *const stg, const size_t id)
{
return storage_is_correct(stg) ? map_to_string(&stg->as, hash_get_key(&stg->hs, id)) : NULL;
return storage_is_correct(stg) ? map_to_string(&stg->as, (size_t)hash_get_key(&stg->hs, id)) : NULL;
}

const char *storage_last_read(const storage *const stg)
Expand Down

0 comments on commit f4c012e

Please sign in to comment.