summaryrefslogtreecommitdiff
path: root/mach-defpager
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-03-12 13:22:53 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-03-12 15:52:21 +0100
commita77077efbd5658a39538557911fccca9da5a81ab (patch)
treef7aeba77a11d50938cab321e08551b0a08784c8d /mach-defpager
parent3deb2d7685f9e9b502a992491f747c3a657e4d15 (diff)
mach-defpager: fix warnings about uninitialized variables
* mach-defpager/default_pager.c (S_default_pager_objects): Initialize address, size-pairs to 0. (S_default_pager_object_pages): Likewise. * mach-defpager/kalloc.c (kget_space): Likewise.
Diffstat (limited to 'mach-defpager')
-rw-r--r--mach-defpager/default_pager.c12
-rw-r--r--mach-defpager/kalloc.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index 1b9d5114..4127126d 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -3423,13 +3423,13 @@ S_default_pager_objects (mach_port_t pager,
mach_port_array_t *portsp,
natural_t *pcountp)
{
- vm_offset_t oaddr; /* memory for objects */
- vm_size_t osize; /* current size */
+ vm_offset_t oaddr = 0; /* memory for objects */
+ vm_size_t osize = 0; /* current size */
default_pager_object_t *objects;
natural_t opotential;
- vm_offset_t paddr; /* memory for ports */
- vm_size_t psize; /* current size */
+ vm_offset_t paddr = 0; /* memory for ports */
+ vm_size_t psize = 0; /* current size */
mach_port_t *ports;
natural_t ppotential;
@@ -3657,8 +3657,8 @@ S_default_pager_object_pages (mach_port_t pager,
default_pager_page_array_t *pagesp,
natural_t *countp)
{
- vm_offset_t addr; /* memory for page offsets */
- vm_size_t size; /* current memory size */
+ vm_offset_t addr = 0; /* memory for page offsets */
+ vm_size_t size = 0; /* current memory size */
default_pager_page_t *pages;
natural_t potential, actual;
kern_return_t kr;
diff --git a/mach-defpager/kalloc.c b/mach-defpager/kalloc.c
index 777cd3d5..2f8f002e 100644
--- a/mach-defpager/kalloc.c
+++ b/mach-defpager/kalloc.c
@@ -122,7 +122,7 @@ void kalloc_init(void)
*/
vm_offset_t kget_space(vm_offset_t size)
{
- vm_size_t space_to_add;
+ vm_size_t space_to_add = 0;
vm_offset_t new_space = 0;
vm_offset_t addr;