Fix -Wconversion warnings in misc2.c