Fix signedness comparision and add compiling time warnings