namelength should be signed, -Werror is probably overkill