Fix "unary minus operator applied to unsigned type, result still unsigned" on MSVC and other stupid warnings