Commit 3f6c925f37cd8a1dddb8a8fbbcef4630ea347775
1 parent
7ec47ead
Use i2c_slave_init() to allocate the PXA (dummy) I2C slave.
Hush the warning: hw/pc.c:402: warning: control reaches end of non-void function git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2856 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
2 additions
and
2 deletions
hw/pc.c
... | ... | @@ -347,7 +347,7 @@ void bochs_bios_init(void) |
347 | 347 | |
348 | 348 | /* Generate an initial boot sector which sets state and jump to |
349 | 349 | a specified vector */ |
350 | -static int generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip) | |
350 | +static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip) | |
351 | 351 | { |
352 | 352 | uint8_t bootsect[512], *p; |
353 | 353 | int i; | ... | ... |
hw/pxa2xx.c
... | ... | @@ -1294,7 +1294,7 @@ struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base, |
1294 | 1294 | { |
1295 | 1295 | int iomemtype; |
1296 | 1296 | struct pxa2xx_i2c_s *s = (struct pxa2xx_i2c_s *) |
1297 | - qemu_mallocz(sizeof(struct pxa2xx_i2c_s)); | |
1297 | + i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s)); | |
1298 | 1298 | |
1299 | 1299 | s->base = base; |
1300 | 1300 | s->irq = irq; | ... | ... |