Fixed some warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4596 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-09-09 02:36:52 +00:00
parent d02898ade8
commit b5a05a72fa
2 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -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;
+6 -6
View File
@@ -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, &region, name); err = map_backing_store(aspace, store, _address, 0, size, addr_type, 0, lock, REGION_NO_PRIVATE_MAP, &region, 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;
} }