Fixed some warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4596 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -382,7 +382,8 @@ delete_team_struct(struct team *team)
|
|||||||
static int
|
static int
|
||||||
get_arguments_data_size(char **args, int argc)
|
get_arguments_data_size(char **args, int argc)
|
||||||
{
|
{
|
||||||
uint32 size = 0, count;
|
uint32 size = 0;
|
||||||
|
int count;
|
||||||
|
|
||||||
for (count = 0; count < argc; count++)
|
for (count = 0; count < argc; count++)
|
||||||
size += strlen(args[count]) + 1;
|
size += strlen(args[count]) + 1;
|
||||||
|
|||||||
@@ -639,8 +639,8 @@ vm_create_anonymous_region(aspace_id aid, const char *name, void **address,
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
region_id vm_map_physical_memory(aspace_id aid, const char *name, void **address, int addr_type,
|
region_id vm_map_physical_memory(aspace_id aid, const char *name, void **_address,
|
||||||
addr size, int lock, addr phys_addr)
|
int addr_type, addr size, int lock, addr phys_addr)
|
||||||
{
|
{
|
||||||
vm_region *region;
|
vm_region *region;
|
||||||
vm_cache *cache;
|
vm_cache *cache;
|
||||||
@@ -679,16 +679,16 @@ region_id vm_map_physical_memory(aspace_id aid, const char *name, void **address
|
|||||||
cache->scan_skip = 1;
|
cache->scan_skip = 1;
|
||||||
|
|
||||||
vm_cache_acquire_ref(cache_ref, true);
|
vm_cache_acquire_ref(cache_ref, true);
|
||||||
err = map_backing_store(aspace, store, address, 0, size, addr_type, 0, lock, REGION_NO_PRIVATE_MAP, ®ion, name);
|
err = map_backing_store(aspace, store, _address, 0, size, addr_type, 0, lock, REGION_NO_PRIVATE_MAP, ®ion, name);
|
||||||
vm_cache_release_ref(cache_ref);
|
vm_cache_release_ref(cache_ref);
|
||||||
vm_put_aspace(aspace);
|
vm_put_aspace(aspace);
|
||||||
if(err < 0) {
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
}
|
|
||||||
|
|
||||||
// modify the pointer returned to be offset back into the new region
|
// modify the pointer returned to be offset back into the new region
|
||||||
// the same way the physical address in was offset
|
// the same way the physical address in was offset
|
||||||
(*address) += map_offset;
|
*_address = (void *)((addr)*_address + map_offset);
|
||||||
|
|
||||||
return region->id;
|
return region->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user