rem: unsigned i;
add: uint32 i;
context: map_image(int fd, char const *path, image_t *image, bool fixed){	unsigned i;	(void)(fd);	for (i = 0; i < image->num_regions; i++) {		char regionName[B_OS_NAME_LENGTH];		addr_t load_address;		unsigned addr_specifier;		// for BeOS compatibility: if we load an old BeOS executable, we		// have to relocate it, if possible - we recognize it because the		// vmstart is set to 0 (hopefully always)		if (fixed && image->regions[i].vmstart == 0)			fixed = false;		snprintf(regionName, sizeof(regionName), "%s_seg%d%s",			path, i, (image->regions[i].flags & RFLAG_RW) ? "rw" : "ro");		if (image->dynamic_ptr && !fixed) {			/*			 * relocatable image... we can afford to place wherever			 */			if (i == 0) {				/*				 * but only the first segment gets a free ride				 */				load_address = 0;				addr_specifier = B_ANY_ADDRESS;			} else {				load_address = image->regions[i].vmstart + image->regions[i-1].delta;				addr_specifier = B_EXACT_ADDRESS;			}		} else {			/*			 * not relocatable, put it where it asks or die trying			 */			load_address = image->regions[i].vmstart;			addr_specifier = B_EXACT_ADDRESS;		}		if (image->regions[i].flags & RFLAG_ANON) {			image->regions[i].id = _kern_create_area(regionName, (void **)&load_address,				addr_specifier, image->regions[i].vmsize, B_NO_LOCK,				B_READ_AREA | B_WRITE_AREA);			if (image->regions[i].id < 0)				goto error;			image->regions[i].delta = load_address - image->regions[i].vmstart;			image->regions[i].vmstart = load_address;		} else {			image->regions[i].id = sys_vm_map_file(regionName, (void **)&load_address,				addr_specifier, image->regions[i].vmsize, B_READ_AREA | B_WRITE_AREA,				REGION_PRIVATE_MAP, path,				_ROUNDOWN(image->regions[i].fdstart, B_PAGE_SIZE));			if (image->regions[i].id < 0)				goto error;			TRACE(("\"%s\" at %p (%s)\n", path, (void *)load_address,				image->regions[i].flags & RFLAG_RW ? "rw" : "read-only"));			image->regions[i].delta = load_address - image->regions[i].vmstart;			image->regions[i].vmstart = load_address;			/*			 * handle trailer bits in data segment			 */			if (image->regions[i].flags & RFLAG_RW) {				unsigned start_clearing;				unsigned to_clear;				start_clearing = image->regions[i].vmstart					+ PAGE_OFFS(image->regions[i].start)					+ image->regions[i].size;				to_clear = image->regions[i].vmsize					- PAGE_OFFS(image->regions[i].start)					- image->regions[i].size;				memset((void*)start_clearing, 0, to_clear);			}		}	}	if (image->dynamic_ptr)		image->dynamic_ptr += image->regions[0].delta;	return true;error:	return false;}