Fix #370: Multiple warnings with -Wsign-compare