Tried to fix the serious compiler warnings

as described in https://github.com/aseprite/aseprite/issues/517.