seoul: enable -Wall and fix warnings

Issue #1262
This commit is contained in:
Alexander Boettcher 2014-10-10 12:24:04 +02:00 committed by Christian Helmuth
parent 443dc1f71d
commit a48efd0a9d
4 changed files with 17 additions and 18 deletions

View File

@ -174,7 +174,7 @@ bool Vancouver_console::receive(MessageConsole &msg)
msg.info->vbe1[5] = 0x0; /* blue field position */
msg.info->vbe1[6] = 0x0; /* reserved mask size */
msg.info->vbe1[7] = 0x0; /* reserved field position */
msg.info->vbe1[8] = 0x0; /* direct color mode info */
msg.info->colormode = 0x0; /* direct color mode info */
msg.info->phys_base = 0xe0000000;
msg.info->_phys_size = _fb_mode.width()*_fb_mode.height()*2;
return true;
@ -192,6 +192,7 @@ bool Vancouver_console::receive(MessageMemRegion &msg)
if (!fb_active) fb_active = true;
Logging::printf("Reactivating text buffer loop.\n");
}
return false;
}
@ -358,9 +359,8 @@ Vancouver_console::Vancouver_console(Synced_motherboard &mb,
:
Thread("vmm_console"),
_startup_lock(Genode::Lock::LOCKED),
_vm_fb_size(vm_fb_size), _motherboard(mb),
_fb_size(0), _pixels(0), _guest_fb(0),
_regs(0), _fb_ds(fb_ds),
_motherboard(mb), _pixels(0), _guest_fb(0), _fb_size(0),
_fb_ds(fb_ds), _vm_fb_size(vm_fb_size), _regs(0),
_left(false), _middle(false), _right(false)
{
start();

View File

@ -207,7 +207,7 @@ bool Vancouver_disk::receive(MessageDisk &msg)
&_diskcon[msg.disknr].blk_size,
&_diskcon[msg.disknr].ops);
Logging::printf("Got info: %lu blocks (%u B), ops (R: %x, W:%x)\n ",
Logging::printf("Got info: %llu blocks (%zu B), ops (R: %x, W:%x)\n ",
_diskcon[msg.disknr].blk_cnt,
_diskcon[msg.disknr].blk_size,
_diskcon[msg.disknr].ops.supported(Block::Packet_descriptor::READ),
@ -215,8 +215,6 @@ bool Vancouver_disk::receive(MessageDisk &msg)
);
}
Block::Session::Tx::Source *source = _diskcon[msg.disknr].blk_con->tx();
msg.error = MessageDisk::DISK_OK;
switch (msg.type) {

View File

@ -188,10 +188,10 @@ class Guest_memory
*/
Guest_memory(Genode::size_t backing_store_size, Genode::size_t fb_size)
:
_backing_store_size(backing_store_size),
_fb_size(fb_size),
_ds(Genode::env()->ram_session()->alloc(backing_store_size-fb_size)),
_fb_ds(Genode::env()->ram_session()->alloc(fb_size)),
_backing_store_size(backing_store_size),
_fb_size(fb_size),
_local_addr(0),
_fb_addr(0),
remaining_size(backing_store_size-fb_size)
@ -446,7 +446,7 @@ class Vcpu_dispatcher : public Vcpu_handler,
+ crd.addr() - vmm_memory_base;
if (verbose_npt)
Logging::printf("NPT mapping (base=0x%lx, order=%d, hotspot=0x%lx)\n",
Logging::printf("NPT mapping (base=0x%lx, order=%lu, hotspot=0x%lx)\n",
crd.base(), crd.order(), hotspot);
utcb->mtd = 0;
@ -622,7 +622,7 @@ class Vcpu_dispatcher : public Vcpu_handler,
void _vmx_ioio()
{
Utcb *utcb = _utcb_of_myself();
unsigned order;
unsigned order = 0U;
if (utcb->qual[0] & 0x10) {
Logging::printf("invalid gueststate\n");
assert(utcb->mtd & MTD_RFLAGS);
@ -866,7 +866,7 @@ class Machine : public StaticReceiver<Machine>
msg.len = _guest_memory.fb_size();
msg.ptr = _guest_memory.backing_store_local_base();
_alloc_fb_mem = false;
Logging::printf("_alloc_fb_mem -> len=0x%lx, ptr=0x%p\n",
Logging::printf("_alloc_fb_mem -> len=0x%zx, ptr=0x%p\n",
msg.len, msg.ptr);
return true;
}
@ -879,7 +879,7 @@ class Machine : public StaticReceiver<Machine>
}
if (verbose_debug)
Logging::printf(" -> len=0x%lx, ptr=0x%p\n",
Logging::printf(" -> len=0x%zx, ptr=0x%p\n",
msg.len, msg.ptr);
return true;
@ -905,7 +905,7 @@ class Machine : public StaticReceiver<Machine>
msg.phys = _guest_memory.remaining_size;
if (verbose_debug)
Logging::printf("-> allocated from guest %08lx+%lx\n",
Logging::printf("-> allocated from guest %08zx+%lx\n",
_guest_memory.remaining_size, msg.value);
return true;
@ -1069,6 +1069,7 @@ class Machine : public StaticReceiver<Machine>
/* start receiver thread for this MAC */
Vancouver_network * netreceiver = new Vancouver_network(_motherboard, _nic);
assert(netreceiver);
return true;
}
@ -1422,17 +1423,17 @@ int main(int argc, char **argv)
/* diagnostic messages */
if (colocate)
Genode::printf("[0x%012lx, 0x%012lx) - %lu MiB - VM accessible "
"memory\n", 0, vm_size, vm_size / 1024 / 1024);
"memory\n", 0UL, vm_size, vm_size / 1024 / 1024);
if (guest_memory.backing_store_local_base())
Genode::printf("[0x%012p, 0x%012p) - %lu MiB - VMM accessible shadow "
Genode::printf("[0x%12p, 0x%12p) - %lu MiB - VMM accessible shadow "
"mapping of VM memory \n",
guest_memory.backing_store_local_base(),
guest_memory.backing_store_local_base() +
guest_memory.remaining_size, vm_size / 1024 / 1024);
if (guest_memory.backing_store_fb_local_base())
Genode::printf("[0x%012p, 0x%012p) - %lu MiB - VMM accessible "
Genode::printf("[0x%12p, 0x%12p) - %lu MiB - VMM accessible "
"framebuffer memory of VM\n",
guest_memory.backing_store_fb_local_base(),
guest_memory.backing_store_fb_local_base() + fb_size,

View File

@ -24,7 +24,7 @@ INC_DIR += $(SEOUL_CONTRIB_DIR)/include
INC_DIR += $(SEOUL_GENODE_DIR)/include
INC_DIR += $(PRG_DIR)/../include
CC_WARN += -Wno-parentheses
CC_WARN += -Wno-parentheses -Wall
CC_CXX_OPT += -march=core2
CC_CXX_OPT += -mssse3