Take out check of len variable in condition.

The check is not necessary because len is initialized with 0
and always incremented before the check. So len is never 0
(if there is no overflow).
Add some more warning compile switches.