Revision 3f4cb3d3

b/block-cow.c
95 95

  
96 96
    /* mmap the bitmap */
97 97
    s->cow_bitmap_size = ((bs->total_sectors + 7) >> 3) + sizeof(cow_header);
98
    s->cow_bitmap_addr = mmap(get_mmap_addr(s->cow_bitmap_size),
99
                              s->cow_bitmap_size,
100
                              PROT_READ | PROT_WRITE,
101
                              MAP_SHARED, s->fd, 0);
98
    s->cow_bitmap_addr = (void *)mmap(get_mmap_addr(s->cow_bitmap_size),
99
                                      s->cow_bitmap_size,
100
                                      PROT_READ | PROT_WRITE,
101
                                      MAP_SHARED, s->fd, 0);
102 102
    if (s->cow_bitmap_addr == MAP_FAILED)
103 103
        goto fail;
104 104
    s->cow_bitmap = s->cow_bitmap_addr + sizeof(cow_header);
......
197 197
static void cow_close(BlockDriverState *bs)
198 198
{
199 199
    BDRVCowState *s = bs->opaque;
200
    munmap(s->cow_bitmap_addr, s->cow_bitmap_size);
200
    munmap((void *)s->cow_bitmap_addr, s->cow_bitmap_size);
201 201
    close(s->fd);
202 202
}
203 203

  
b/block-qcow.c
583 583
    if (!acb->cluster_offset) {
584 584
        if (bs->backing_hd) {
585 585
            /* read from the base image */
586
            acb->hd_iov.iov_base = acb->buf;
586
            acb->hd_iov.iov_base = (void *)acb->buf;
587 587
            acb->hd_iov.iov_len = acb->n * 512;
588 588
            qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
589 589
            acb->hd_aiocb = bdrv_aio_readv(bs->backing_hd, acb->sector_num,
......
607 607
            ret = -EIO;
608 608
            goto done;
609 609
        }
610
        acb->hd_iov.iov_base = acb->buf;
610
        acb->hd_iov.iov_base = (void *)acb->buf;
611 611
        acb->hd_iov.iov_len = acb->n * 512;
612 612
        qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
613 613
        acb->hd_aiocb = bdrv_aio_readv(s->hd,
......
643 643
    if (qiov->niov > 1)
644 644
        acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
645 645
    else
646
        acb->buf = qiov->iov->iov_base;
646
        acb->buf = (uint8_t *)qiov->iov->iov_base;
647 647
    acb->nb_sectors = nb_sectors;
648 648
    acb->n = 0;
649 649
    acb->cluster_offset = 0;
......
738 738
    if (qiov->niov > 1) {
739 739
        acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
740 740
        qemu_iovec_to_buffer(qiov, acb->buf);
741
    } else
742
        acb->buf = qiov->iov->iov_base;
741
    } else {
742
        acb->buf = (uint8_t *)qiov->iov->iov_base;
743
    }
743 744
    acb->nb_sectors = nb_sectors;
744 745
    acb->n = 0;
745 746

  
b/block-qcow2.c
1346 1346
            n1 = backing_read1(bs->backing_hd, acb->sector_num,
1347 1347
                               acb->buf, acb->n);
1348 1348
            if (n1 > 0) {
1349
                acb->hd_iov.iov_base = acb->buf;
1349
                acb->hd_iov.iov_base = (void *)acb->buf;
1350 1350
                acb->hd_iov.iov_len = acb->n * 512;
1351 1351
                qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
1352 1352
                acb->hd_aiocb = bdrv_aio_readv(bs->backing_hd, acb->sector_num,
......
1381 1381
            goto done;
1382 1382
        }
1383 1383

  
1384
        acb->hd_iov.iov_base = acb->buf;
1384
        acb->hd_iov.iov_base = (void *)acb->buf;
1385 1385
        acb->hd_iov.iov_len = acb->n * 512;
1386 1386
        qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1);
1387 1387
        acb->hd_aiocb = bdrv_aio_readv(s->hd,
......
1417 1417
        acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size);
1418 1418
        if (is_write)
1419 1419
            qemu_iovec_to_buffer(qiov, acb->buf);
1420
    } else
1421
        acb->buf = qiov->iov->iov_base;
1420
    } else {
1421
        acb->buf = (uint8_t *)qiov->iov->iov_base;
1422
    }
1422 1423
    acb->nb_sectors = nb_sectors;
1423 1424
    acb->n = 0;
1424 1425
    acb->cluster_offset = 0;
b/block-vvfat.c
1778 1778
	}
1779 1779

  
1780 1780
	for (i = 0; i < 0x10 * s->sectors_per_cluster; i++) {
1781
	    int cluster_count;
1781
	    int cluster_count = 0;
1782 1782

  
1783 1783
DLOG(fprintf(stderr, "check direntry %d: \n", i); print_direntry(direntries + i));
1784 1784
	    if (is_volume_label(direntries + i) || is_dot(direntries + i) ||
b/block.c
1434 1434
    QEMUIOVector qiov;
1435 1435

  
1436 1436
    async_ret = NOT_DONE;
1437
    iov.iov_base = buf;
1437
    iov.iov_base = (void *)buf;
1438 1438
    iov.iov_len = nb_sectors * 512;
1439 1439
    qemu_iovec_init_external(&qiov, &iov, 1);
1440 1440
    acb = bdrv_aio_readv(bs, sector_num, &qiov, nb_sectors,
b/bt-host.c
53 53
    struct iovec iv[2];
54 54
    int ret;
55 55

  
56
    iv[0].iov_base = &pkt;
56
    iv[0].iov_base = (void *)&pkt;
57 57
    iv[0].iov_len  = 1;
58 58
    iv[1].iov_base = (void *) data;
59 59
    iv[1].iov_len  = len;
b/fpu/softfloat-macros.h
590 590

  
591 591
    index = ( a>>27 ) & 15;
592 592
    if ( aExp & 1 ) {
593
        z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ];
593
        z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ (int)index ];
594 594
        z = ( ( a / z )<<14 ) + ( z<<15 );
595 595
        a >>= 1;
596 596
    }
597 597
    else {
598
        z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ];
598
        z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ (int)index ];
599 599
        z = a / z + z;
600 600
        z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 );
601 601
        if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 );
b/hw/ide.c
1469 1469
#ifdef DEBUG_AIO
1470 1470
    printf("aio_read_cd: lba=%u n=%d\n", s->lba, n);
1471 1471
#endif
1472
    bm->iov.iov_base = s->io_buffer + data_offset;
1472
    bm->iov.iov_base = (void *)(s->io_buffer + data_offset);
1473 1473
    bm->iov.iov_len = n * 4 * 512;
1474 1474
    qemu_iovec_init_external(&bm->qiov, &bm->iov, 1);
1475 1475
    bm->aiocb = bdrv_aio_readv(s->bs, (int64_t)s->lba << 2, &bm->qiov,
b/hw/scsi-disk.c
335 335
        BADF("Bad buffer tag 0x%x\n", tag);
336 336
        return NULL;
337 337
    }
338
    return r->iov.iov_base;
338
    return (uint8_t *)r->iov.iov_base;
339 339
}
340 340

  
341 341
/* Execute a scsi command.  Returns the length of the data expected by the
......
365 365
    /* ??? Tags are not unique for different luns.  We only implement a
366 366
       single lun, so this should not matter.  */
367 367
    r = scsi_new_request(s, tag);
368
    outbuf = r->iov.iov_base;
368
    outbuf = (uint8_t *)r->iov.iov_base;
369 369
    is_write = 0;
370 370
    DPRINTF("Command: lun=%d tag=0x%x data=0x%02x", lun, tag, buf[0]);
371 371
    switch (command >> 5) {
b/hw/virtio-console.c
38 38
        ssize_t len = 0;
39 39
        int d;
40 40

  
41
        for (d=0; d < elem.out_num; d++)
42
            len += qemu_chr_write(s->chr, elem.out_sg[d].iov_base,elem.out_sg[d].iov_len);
41
        for (d = 0; d < elem.out_num; d++) {
42
            len += qemu_chr_write(s->chr, (uint8_t *)elem.out_sg[d].iov_base,
43
                                  elem.out_sg[d].iov_len);
44
        }
43 45
        virtqueue_push(vq, &elem, len);
44 46
        virtio_notify(vdev, vq);
45 47
    }
b/hw/virtio-net.c
313 313
static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt,
314 314
                          const void *buf, size_t size, size_t hdr_len)
315 315
{
316
    struct virtio_net_hdr *hdr = iov[0].iov_base;
316
    struct virtio_net_hdr *hdr = (struct virtio_net_hdr *)iov[0].iov_base;
317 317
    int offset = 0;
318 318

  
319 319
    hdr->flags = 0;
b/net.c
626 626
    }
627 627

  
628 628
    /* XXX: better tmp dir construction */
629
    snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
629
    snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld", (long)getpid());
630 630
    if (mkdir(smb_dir, 0700) < 0) {
631 631
        fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
632 632
        exit(1);
......
740 740
    struct strbuf sbuf;
741 741
    int f = 0;
742 742
    sbuf.maxlen = sizeof(buf);
743
    sbuf.buf = buf;
743
    sbuf.buf = (char *)buf;
744 744
    size = getmsg(s->fd, NULL, &sbuf, &f) >=0 ? sbuf.len : -1;
745 745
#else
746 746
    size = read(s->fd, buf, sizeof(buf));
......
796 796
 * Allocate TAP device, returns opened fd.
797 797
 * Stores dev name in the first arg(must be large enough).
798 798
 */
799
int tap_alloc(char *dev, size_t dev_size)
799
static int tap_alloc(char *dev, size_t dev_size)
800 800
{
801 801
    int tap_fd, if_fd, ppa = -1;
802 802
    static int ip_fd = 0;
b/qemu-char.c
754 754

  
755 755
#ifdef __sun__
756 756
/* Once Solaris has openpty(), this is going to be removed. */
757
int openpty(int *amaster, int *aslave, char *name,
758
            struct termios *termp, struct winsize *winp)
757
static int openpty(int *amaster, int *aslave, char *name,
758
                   struct termios *termp, struct winsize *winp)
759 759
{
760 760
        const char *slave;
761 761
        int mfd = -1, sfd = -1;
......
795 795
        return -1;
796 796
}
797 797

  
798
void cfmakeraw (struct termios *termios_p)
798
static void cfmakeraw (struct termios *termios_p)
799 799
{
800 800
        termios_p->c_iflag &=
801 801
                ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);

Also available in: Unified diff