Fix signed unsigned compares

Warnings produced by -Wextra or -Wsign-compare (some ignored focused on sign compares)