fix conversion warnings

Those warnings are not enabled by default,
but getting rid of them doesn't hurt.
Merge pull request #2497 from cremno/fix-conversion-warnings

fix conversion warnings (in gc.c)