Change i to unsigned in get_generic_seed().