--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,

                                     int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
+
+                                    uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)

+{
+
 #ifdef HAVE_MMX

     if (c->flags & SWS_ACCURATE_RND){

static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,

                                    int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,

                                    uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)

{

#ifdef HAVE_MMX

    if (c->flags & SWS_ACCURATE_RND){

        if (uDest){

            YSCALEYUV2YV12X_ACCURATE(   0, CHR_MMX_FILTER_OFFSET, uDest, chrDstW)

            YSCALEYUV2YV12X_ACCURATE(4096, CHR_MMX_FILTER_OFFSET, vDest, chrDstW)

        }

        YSCALEYUV2YV12X_ACCURATE(0, LUM_MMX_FILTER_OFFSET, dest, dstW)

    }else{

        if (uDest){

            YSCALEYUV2YV12X(   0, CHR_MMX_FILTER_OFFSET, uDest, chrDstW)

            YSCALEYUV2YV12X(4096, CHR_MMX_FILTER_OFFSET, vDest, chrDstW)

        }

        YSCALEYUV2YV12X(0, LUM_MMX_FILTER_OFFSET, dest, dstW)

    }

#else

#ifdef HAVE_ALTIVEC

yuv2yuvX_altivec_real(lumFilter, lumSrc, lumFilterSize,

                      chrFilter, chrSrc, chrFilterSize,

                      dest, uDest, vDest, dstW, chrDstW);

#else //HAVE_ALTIVEC

yuv2yuvXinC(lumFilter, lumSrc, lumFilterSize,

            chrFilter, chrSrc, chrFilterSize,

            dest, uDest, vDest, dstW, chrDstW);

#endif //!HAVE_ALTIVEC

#endif /* HAVE_MMX */

}


--- a/source.c
+++ b/source.c
@@ -11,10 +11,10 @@
     block_mig_state.submitted = 0;

     block_mig_state.read_done = 0;
+
     block_mig_state.transferred = 0;

+    block_mig_state.total_sector_sum = 0;

     block_mig_state.prev_progress = -1;

static void init_blk_migration(Monitor *mon, QEMUFile *f)

{

    BlkMigDevState *bmds;

    BlockDriverState *bs;

    block_mig_state.submitted = 0;

    block_mig_state.read_done = 0;

    block_mig_state.transferred = 0;

    block_mig_state.total_sector_sum = 0;

    block_mig_state.prev_progress = -1;

    for (bs = bdrv_first; bs != NULL; bs = bs->next) {

        if (bs->type == BDRV_TYPE_HD) {

            bmds = qemu_mallocz(sizeof(BlkMigDevState));

            bmds->bs = bs;

            bmds->bulk_completed = 0;

            bmds->total_sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;

            bmds->completed_sectors = 0;

            bmds->shared_base = block_mig_state.shared_base;

            block_mig_state.total_sector_sum += bmds->total_sectors;

            if (bmds->shared_base) {

                monitor_printf(mon, "Start migration for %s with shared base "

                                    "image\n",

                               bs->device_name);

            } else {

                monitor_printf(mon, "Start full migration for %s\n",

                               bs->device_name);

            }

            QSIMPLEQ_INSERT_TAIL(&block_mig_state.bmds_list, bmds, entry);

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
+static int count_contiguous_free_clusters(int nb_clusters, uint64_t *l2_table)

 {

+    int i;

static int count_contiguous_free_clusters(int nb_clusters, uint64_t *l2_table)

{

    int i;

    for (i = 0; i < nb_clusters; i++) {

        int type = qcow2_get_cluster_type(be64_to_cpu(l2_table[i]));

        if (type != QCOW2_CLUSTER_UNALLOCATED) {

            break;

        }

    }

    return i;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
+static inline int is_yuv_planar(const PixFmtInfo *ps)
+
 {

     return (ps->color_type == FF_COLOR_YUV ||

static inline int is_yuv_planar(const PixFmtInfo *ps)

{

    return (ps->color_type == FF_COLOR_YUV ||

            ps->color_type == FF_COLOR_YUV_JPEG) &&

        ps->pixel_type == FF_PIXEL_PLANAR;

}


--- a/source.c
+++ b/source.c
@@ -17,11 +17,11 @@
                 error_setg(errp, "No MTTCG when icount is enabled");

             } else {
+
+
+
+
+
                 if (!check_tcg_memory_orders_compatible()) {

                     error_report("Guest expects a stronger memory ordering "

void qemu_tcg_configure(QemuOpts *opts, Error **errp)

{

    const char *t = qemu_opt_get(opts, "thread");

    if (t) {

        if (strcmp(t, "multi") == 0) {

            if (TCG_OVERSIZED_GUEST) {

                error_setg(errp, "No MTTCG when guest word size > hosts");

            } else if (use_icount) {

                error_setg(errp, "No MTTCG when icount is enabled");

            } else {

                if (!check_tcg_memory_orders_compatible()) {

                    error_report("Guest expects a stronger memory ordering "

                                 "than the host provides");

                    error_printf("This may cause strange/hard to debug errors");

                }

                mttcg_enabled = true;

            }

        } else if (strcmp(t, "single") == 0) {

            mttcg_enabled = false;

        } else {

            error_setg(errp, "Invalid 'thread' setting %s", t);

        }

    } else {

        mttcg_enabled = default_mttcg_enabled();

    }

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc,
+
+                             int offset)
+
 {

     uint8_t *start = pc->buffer + offset;

static int unpack_parse_unit(DiracParseUnit *pu, DiracParseContext *pc,

                             int offset)

{

    uint8_t *start = pc->buffer + offset;

    uint8_t *end   = pc->buffer + pc->index;

    if (start < pc->buffer || (start + 13 > end))

        return 0;

    pu->pu_type = start[4];

    pu->next_pu_offset = AV_RB32(start + 5);

    pu->prev_pu_offset = AV_RB32(start + 9);

    if (pu->pu_type == 0x10 && pu->next_pu_offset == 0)

        pu->next_pu_offset = 13;

    return 1;

}


--- a/source.c
+++ b/source.c
@@ -32,8 +32,8 @@

+    trace_paio_submit(acb, opaque, sector_num, nb_sectors, type);
+
+    return thread_pool_submit_aio(aio_worker, acb, cb, opaque);
+
+}

static BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,

        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,

        BlockDriverCompletionFunc *cb, void *opaque, int type)

{

    RawPosixAIOData *acb = g_slice_new(RawPosixAIOData);

    acb->bs = bs;

    acb->aio_type = type;

    acb->aio_fildes = fd;

    if (qiov) {

        acb->aio_iov = qiov->iov;

        acb->aio_niov = qiov->niov;

    }

    acb->aio_nbytes = nb_sectors * 512;

    acb->aio_offset = sector_num * 512;

    trace_paio_submit(acb, opaque, sector_num, nb_sectors, type);

    return thread_pool_submit_aio(aio_worker, acb, cb, opaque);

}


--- a/source.c
+++ b/source.c
@@ -3,7 +3,7 @@
 {

     CPUState *cs = CPU(obj);
+
     AlphaCPU *cpu = ALPHA_CPU(obj);

     CPUAlphaState *env = &cpu->env;

static void alpha_cpu_initfn(Object *obj)

{

    CPUState *cs = CPU(obj);

    AlphaCPU *cpu = ALPHA_CPU(obj);

    CPUAlphaState *env = &cpu->env;

    cs->env_ptr = env;

    cpu_exec_init(cs, &error_abort);

    tlb_flush(cs, 1);

    alpha_translate_init();

#if defined(CONFIG_USER_ONLY)

    env->ps = PS_USER_MODE;

    cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD

                               | FPCR_UNFD | FPCR_INED | FPCR_DNOD

                               | FPCR_DYN_NORMAL));

#endif

    env->lock_addr = -1;

    env->fen = 1;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 BlockDriverState *bdrv_all_find_vmstate_bs(void)
+
+{
+
+    bool not_found = true;

     BlockDriverState *bs;
+
     BdrvNextIterator *it = NULL;

BlockDriverState *bdrv_all_find_vmstate_bs(void)

{

    bool not_found = true;

    BlockDriverState *bs;

    BdrvNextIterator *it = NULL;

    while (not_found && (it = bdrv_next(it, &bs))) {

        AioContext *ctx = bdrv_get_aio_context(bs);

        aio_context_acquire(ctx);

        not_found = !bdrv_can_snapshot(bs);

        aio_context_release(ctx);

    }

    return bs;

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

                              int nb_sectors, int *pnum)

+{

     BDRVVmdkState *s = bs->opaque;

static int vmdk_is_allocated(BlockDriverState *bs, int64_t sector_num,

                             int nb_sectors, int *pnum)

{

    BDRVVmdkState *s = bs->opaque;

    int index_in_cluster, n;

    uint64_t cluster_offset;

    cluster_offset = get_cluster_offset(bs, sector_num << 9, 0);

    index_in_cluster = sector_num % s->cluster_sectors;

    n = s->cluster_sectors - index_in_cluster;

    if (n > nb_sectors)

        n = nb_sectors;

    *pnum = n;

    return (cluster_offset != 0);

}


--- a/source.c
+++ b/source.c
@@ -5,7 +5,7 @@
     RTPMuxContext *s = s1->priv_data;

     int len, max_packet_size;
+
     uint8_t *q;

void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size)

{

    RTPMuxContext *s = s1->priv_data;

    int len, max_packet_size;

    uint8_t *q;

    max_packet_size = s->max_payload_size;

    while (size > 0) {

        q = s->buf;

        if ((buf1[0] == 0) && (buf1[1] == 0)) {

            *q++ = 0x04;

            buf1 += 2;

            size -= 2;

        } else {

            *q++ = 0;

        }

        *q++ = 0;

        len = FFMIN(max_packet_size - 2, size);

        /* Look for a better place to split the frame into packets. */

        if (len < size) {

            const uint8_t *end = find_resync_marker_reverse(buf1, buf1 + len);

            len = end - buf1;

        }

        memcpy(q, buf1, len);

        q += len;

        /* 90 KHz time stamp */

        s->timestamp = s->cur_timestamp;

        ff_rtp_send_data(s1, s->buf, q - s->buf, (len == size));

        buf1 += len;

        size -= len;

    }

}


--- a/source.c
+++ b/source.c
@@ -5,7 +5,7 @@
     RavenPCIState *s = RAVEN_PCI_DEVICE(d);

     char *filename;
+
     int bios_size = -1;

static void raven_realize(PCIDevice *d, Error **errp)

{

    RavenPCIState *s = RAVEN_PCI_DEVICE(d);

    char *filename;

    int bios_size = -1;

    d->config[0x0C] = 0x08; // cache_line_size

    d->config[0x0D] = 0x10; // latency_timer

    d->config[0x34] = 0x00; // capabilities_pointer

    memory_region_init_ram(&s->bios, OBJECT(s), "bios", BIOS_SIZE,

                           &error_abort);

    memory_region_set_readonly(&s->bios, true);

    memory_region_add_subregion(get_system_memory(), (uint32_t)(-BIOS_SIZE),

                                &s->bios);

    vmstate_register_ram_global(&s->bios);

    if (s->bios_name) {

        filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, s->bios_name);

        if (filename) {

            if (s->elf_machine != EM_NONE) {

                bios_size = load_elf(filename, NULL, NULL, NULL,

                                     NULL, NULL, 1, s->elf_machine, 0);

            }

            if (bios_size < 0) {

                bios_size = get_image_size(filename);

                if (bios_size > 0 && bios_size <= BIOS_SIZE) {

                    hwaddr bios_addr;

                    bios_size = (bios_size + 0xfff) & ~0xfff;

                    bios_addr = (uint32_t)(-BIOS_SIZE);

                    bios_size = load_image_targphys(filename, bios_addr,

                                                    bios_size);

                }

            }

        }

        if (bios_size < 0 || bios_size > BIOS_SIZE) {

            hw_error("qemu: could not load bios image '%s'\n", s->bios_name);

        }

        g_free(filename);

    }

}


--- a/source.c
+++ b/source.c
@@ -6,11 +6,11 @@

     int i;

+
+
+    out[0] = get_bits(bitbuf, 8);
+
+    seed   = string_table[out[0]];

static void svq1_parse_string(GetBitContext *bitbuf, uint8_t *out)

{

    uint8_t seed;

    int i;

    out[0] = get_bits(bitbuf, 8);

    seed   = string_table[out[0]];

    for (i = 1; i <= out[0]; i++) {

        out[i] = get_bits(bitbuf, 8) ^ seed;

        seed   = string_table[out[i] ^ seed];

    }

}


--- a/source.c
+++ b/source.c
@@ -12,11 +12,11 @@

     unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;

+    unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE;
+
+
+
+    /*

      * bitmap-traveling is faster than memory-traveling (for addr...)

static int kvm_get_dirty_pages_log_range(MemoryRegionSection *section,

                                         unsigned long *bitmap)

{

    unsigned int i, j;

    unsigned long page_number, c;

    hwaddr addr, addr1;

    unsigned int len = ((section->size / TARGET_PAGE_SIZE) + HOST_LONG_BITS - 1) / HOST_LONG_BITS;

    unsigned long hpratio = getpagesize() / TARGET_PAGE_SIZE;

    /*

     * bitmap-traveling is faster than memory-traveling (for addr...)

     * especially when most of the memory is not dirty.

     */

    for (i = 0; i < len; i++) {

        if (bitmap[i] != 0) {

            c = leul_to_cpu(bitmap[i]);

            do {

                j = ffsl(c) - 1;

                c &= ~(1ul << j);

                page_number = (i * HOST_LONG_BITS + j) * hpratio;

                addr1 = page_number * TARGET_PAGE_SIZE;

                addr = section->offset_within_region + addr1;

                memory_region_set_dirty(section->mr, addr,

                                        TARGET_PAGE_SIZE * hpratio);

            } while (c != 0);

        }

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@
         penv = first_cpu;

         while (penv) {
+
+            qemu_thread_signal(penv->thread, SIGUSR1);
+
+            penv = (CPUState *)penv->next_cpu;
+
         }

     }

static void pause_all_vcpus(void)

{

    CPUState *penv = first_cpu;

    while (penv) {

        penv->stop = 1;

        qemu_thread_signal(penv->thread, SIGUSR1);

        qemu_cpu_kick(penv);

        penv = (CPUState *)penv->next_cpu;

    }

    while (!all_vcpus_paused()) {

        qemu_cond_timedwait(&qemu_pause_cond, &qemu_global_mutex, 100);

        penv = first_cpu;

        while (penv) {

            qemu_thread_signal(penv->thread, SIGUSR1);

            penv = (CPUState *)penv->next_cpu;

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -33,11 +33,11 @@
         return;

     }
+
+
+
+    rtas_st(rets, 0, 0); /* Success */
+
     rtas_st(rets, 1, ics->irqs[nr - ics->offset].server);

     rtas_st(rets, 2, ics->irqs[nr - ics->offset].priority);

static void rtas_get_xive(sPAPREnvironment *spapr, uint32_t token,

                          uint32_t nargs, target_ulong args,

                          uint32_t nret, target_ulong rets)

{

    struct ics_state *ics = spapr->icp->ics;

    uint32_t nr;

    if ((nargs != 1) || (nret != 3)) {

        rtas_st(rets, 0, -3);

        return;

    }

    nr = rtas_ld(args, 0);

    if (!ics_valid_irq(ics, nr)) {

        rtas_st(rets, 0, -3);

        return;

    }

    rtas_st(rets, 0, 0); /* Success */

    rtas_st(rets, 1, ics->irqs[nr - ics->offset].server);

    rtas_st(rets, 2, ics->irqs[nr - ics->offset].priority);

}


--- a/source.c
+++ b/source.c
@@ -3,7 +3,7 @@
 {

     CPUState *cs = CPU(obj);
+
     SuperHCPU *cpu = SUPERH_CPU(obj);

     CPUSH4State *env = &cpu->env;

static void superh_cpu_initfn(Object *obj)

{

    CPUState *cs = CPU(obj);

    SuperHCPU *cpu = SUPERH_CPU(obj);

    CPUSH4State *env = &cpu->env;

    cs->env_ptr = env;

    cpu_exec_init(cs, &error_abort);

    env->movcal_backup_tail = &(env->movcal_backup);

    if (tcg_enabled()) {

        sh4_translate_init();

    }

}


--- a/source.c
+++ b/source.c
@@ -9,15 +9,15 @@
     AVIOContext *pb = wtv->pb;

     AVStream *st = s->streams[0];
+
+    int64_t ts_relative;

     int i;

     if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE))
+
         return AVERROR(ENOSYS);

static int read_seek(AVFormatContext *s, int stream_index,

                     int64_t ts, int flags)

{

    WtvContext *wtv = s->priv_data;

    AVIOContext *pb = wtv->pb;

    AVStream *st = s->streams[0];

    int64_t ts_relative;

    int i;

    if ((flags & AVSEEK_FLAG_FRAME) || (flags & AVSEEK_FLAG_BYTE))

        return AVERROR(ENOSYS);

    /* timestamp adjustment is required because wtv->pts values are absolute,

     * whereas AVIndexEntry->timestamp values are relative to epoch. */

    ts_relative = ts;

    if (wtv->epoch != AV_NOPTS_VALUE)

        ts_relative -= wtv->epoch;

    i = ff_index_search_timestamp(wtv->index_entries, wtv->nb_index_entries, ts_relative, flags);

    if (i < 0) {

        if (wtv->last_valid_pts == AV_NOPTS_VALUE || ts < wtv->last_valid_pts)

            avio_seek(pb, 0, SEEK_SET);

        else if (st->duration != AV_NOPTS_VALUE && ts_relative > st->duration && wtv->nb_index_entries)

            avio_seek(pb, wtv->index_entries[wtv->nb_index_entries - 1].pos, SEEK_SET);

        if (parse_chunks(s, SEEK_TO_PTS, ts, 0) < 0)

            return AVERROR(ERANGE);

        return 0;

    }

    wtv->pts = wtv->index_entries[i].timestamp;

    if (wtv->epoch != AV_NOPTS_VALUE)

        wtv->pts += wtv->epoch;

    wtv->last_valid_pts = wtv->pts;

    avio_seek(pb, wtv->index_entries[i].pos, SEEK_SET);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
     /* for each stream, reset read state */

     for(i = 0; i < s->nb_streams; i++) {
+
+        st = s->streams[i];
+
+
+
         if (st->parser) {

             av_parser_close(st->parser);

void ff_read_frame_flush(AVFormatContext *s)

{

    AVStream *st;

    int i, j;

    flush_packet_queue(s);

    s->cur_st = NULL;

    /* for each stream, reset read state */

    for(i = 0; i < s->nb_streams; i++) {

        st = s->streams[i];

        if (st->parser) {

            av_parser_close(st->parser);

            st->parser = NULL;

            av_free_packet(&st->cur_pkt);

        }

        st->last_IP_pts = AV_NOPTS_VALUE;

        st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */

        st->reference_dts = AV_NOPTS_VALUE;

        /* fail safe */

        st->cur_ptr = NULL;

        st->cur_len = 0;

        st->probe_packets = MAX_PROBE_PACKETS;

        for(j=0; j<MAX_REORDER_DELAY+1; j++)

            st->pts_buffer[j]= AV_NOPTS_VALUE;

    }

}


--- a/source.c
+++ b/source.c
@@ -5,7 +5,7 @@
     if (ret <= 0) {

         if (ret == 0) {
+
             VNC_DEBUG("Closing down client sock: EOF\n");

         } else if (ret != QIO_CHANNEL_ERR_BLOCK) {

ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp)

{

    if (ret <= 0) {

        if (ret == 0) {

            VNC_DEBUG("Closing down client sock: EOF\n");

        } else if (ret != QIO_CHANNEL_ERR_BLOCK) {

            VNC_DEBUG("Closing down client sock: ret %zd (%s)\n",

                      ret, errp ? error_get_pretty(*errp) : "Unknown");

        }

        vnc_disconnect_start(vs);

        if (errp) {

            error_free(*errp);

            *errp = NULL;

        }

        return 0;

    }

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
+static int qemu_chr_open_pipe(QemuOpts *opts, CharDriverState **_chr)

 {

     int fd_in, fd_out;

+    char filename_in[256], filename_out[256];

     const char *filename = qemu_opt_get(opts, "path");

@@ -13,13 +13,13 @@
     if (filename == NULL) {

         fprintf(stderr, "chardev: pipe: no filename given\n");
+
+        return -EINVAL;
+
     }

+
+
     snprintf(filename_in, 256, "%s.in", filename);

     snprintf(filename_out, 256, "%s.out", filename);

static int qemu_chr_open_pipe(QemuOpts *opts, CharDriverState **_chr)

{

    int fd_in, fd_out;

    char filename_in[256], filename_out[256];

    const char *filename = qemu_opt_get(opts, "path");

    if (filename == NULL) {

        fprintf(stderr, "chardev: pipe: no filename given\n");

        return -EINVAL;

    }

    snprintf(filename_in, 256, "%s.in", filename);

    snprintf(filename_out, 256, "%s.out", filename);

    TFR(fd_in = qemu_open(filename_in, O_RDWR | O_BINARY));

    TFR(fd_out = qemu_open(filename_out, O_RDWR | O_BINARY));

    if (fd_in < 0 || fd_out < 0) {

	if (fd_in >= 0)

	    close(fd_in);

	if (fd_out >= 0)

	    close(fd_out);

        TFR(fd_in = fd_out = qemu_open(filename, O_RDWR | O_BINARY));

        if (fd_in < 0) {

            return -errno;

        }

    }

    *_chr = qemu_chr_open_fd(fd_in, fd_out);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -7,11 +7,11 @@
     VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);

     CcwDevice *ccw_dev = CCW_DEVICE(d);
+
+    SubchDev *sch = ccw_dev->sch;
+
+    int n = virtio_get_num_queues(vdev);
+
     S390FLICState *flic = s390_get_flic();

static void virtio_ccw_device_plugged(DeviceState *d, Error **errp)

{

    VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);

    VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);

    CcwDevice *ccw_dev = CCW_DEVICE(d);

    SubchDev *sch = ccw_dev->sch;

    int n = virtio_get_num_queues(vdev);

    S390FLICState *flic = s390_get_flic();

    if (!virtio_has_feature(vdev->host_features, VIRTIO_F_VERSION_1)) {

        dev->max_rev = 0;

    }

    if (virtio_get_num_queues(vdev) > VIRTIO_CCW_QUEUE_MAX) {

        error_setg(errp, "The number of virtqueues %d "

                   "exceeds ccw limit %d", n,

                   VIRTIO_CCW_QUEUE_MAX);

        return;

    }

    if (virtio_get_num_queues(vdev) > flic->adapter_routes_max_batch) {

        error_setg(errp, "The number of virtqueues %d "

                   "exceeds flic adapter route limit %d", n,

                   flic->adapter_routes_max_batch);

        return;

    }

    sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);

    css_generate_sch_crws(sch->cssid, sch->ssid, sch->schid,

                          d->hotplugged, 1);

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static int get_channel_idx(char **map, int *ch, char delim, int max_ch)

 {
+
+    char *next = split(*map, delim);
+
+    int len;
+
     int n = 0;

     if (!next && delim == '-')

static int get_channel_idx(char **map, int *ch, char delim, int max_ch)

{

    char *next = split(*map, delim);

    int len;

    int n = 0;

    if (!next && delim == '-')

        return AVERROR(EINVAL);

    if (!*map)

        return AVERROR(EINVAL);

    len = strlen(*map);

    sscanf(*map, "%d%n", ch, &n);

    if (n != len)

        return AVERROR(EINVAL);

    if (*ch < 0 || *ch > max_ch)

        return AVERROR(EINVAL);

    *map = next;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 void do_fctiwz (void)
+
+{
+
+    union {
+
         double d;

         uint64_t i;

void do_fctiwz (void)

{

    union {

        double d;

        uint64_t i;

    } p;

    /* XXX: higher bits are not supposed to be significant.

     *      to make tests easier, return the same as a real PowerPC 750 (aka G3)

     */

    p.i = float64_to_int32_round_to_zero(FT0, &env->fp_status);

    p.i |= 0xFFF80000ULL << 32;

    FT0 = p.d;

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
+static int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
+
 {

     if (!balloon_event_fn) {
+
         return 0;

     }

static int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)

{

    if (!balloon_event_fn) {

        return 0;

    }

    trace_balloon_event(balloon_opaque, target);

    balloon_event_fn(balloon_opaque, target, cb, opaque);

    return 1;

}


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

 {

+    QVirtioPCIForeachData *d = data;

     QVirtioPCIDevice *vpcidev = qpcidevice_to_qvirtiodevice(dev);

static void qvirtio_pci_foreach_callback(

                        QPCIDevice *dev, int devfn, void *data)

{

    QVirtioPCIForeachData *d = data;

    QVirtioPCIDevice *vpcidev = qpcidevice_to_qvirtiodevice(dev);

    if (vpcidev->vdev.device_type == d->device_type &&

        (!d->has_slot || vpcidev->pdev->devfn == d->slot << 3)) {

        d->func(&vpcidev->vdev, d->user_data);

    } else {

        g_free(vpcidev);

    }

}


--- a/source.c
+++ b/source.c
@@ -26,10 +26,10 @@

     if (net_boot_mask) {

+        fprintf(stderr, "Cannot boot from non-existent NIC\n");
+
+        exit(1);
+
+    }

 }

void net_set_boot_mask(int net_boot_mask)

{

    int i;

    /* Only the first four NICs may be bootable */

    net_boot_mask = net_boot_mask & 0xF;

    for (i = 0; i < nb_nics; i++) {

        if (net_boot_mask & (1 << i)) {

            net_boot_mask &= ~(1 << i);

        }

    }

    if (net_boot_mask) {

        fprintf(stderr, "Cannot boot from non-existent NIC\n");

        exit(1);

    }

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
     dbs->acb = NULL;

     dbs->bs = bs;
+
+    dbs->sg = sg;
+
+    dbs->sector_num = sector_num;
+
     dbs->sg_cur_index = 0;

     dbs->sg_cur_byte = 0;

BlockDriverAIOCB *dma_bdrv_io(

    BlockDriverState *bs, QEMUSGList *sg, uint64_t sector_num,

    DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,

    void *opaque, DMADirection dir)

{

    DMAAIOCB *dbs = qemu_aio_get(&dma_aiocb_info, bs, cb, opaque);

    trace_dma_bdrv_io(dbs, bs, sector_num, (dir == DMA_DIRECTION_TO_DEVICE));

    dbs->acb = NULL;

    dbs->bs = bs;

    dbs->sg = sg;

    dbs->sector_num = sector_num;

    dbs->sg_cur_index = 0;

    dbs->sg_cur_byte = 0;

    dbs->dir = dir;

    dbs->io_func = io_func;

    dbs->bh = NULL;

    qemu_iovec_init(&dbs->iov, sg->nsg);

    dma_bdrv_cb(dbs, 0);

    return &dbs->common;

}


--- a/source.c
+++ b/source.c
@@ -1,12 +1,12 @@
 static void test_bmdma_no_busmaster(void)

+{

+    QPCIDevice *dev;

     void *bmdma_base, *ide_base;

+    uint8_t status;

static void test_bmdma_no_busmaster(void)

{

    QPCIDevice *dev;

    void *bmdma_base, *ide_base;

    uint8_t status;

    dev = get_pci_device(&bmdma_base, &ide_base);

    /* No PRDT_EOT, each entry addr 0/size 64k, and in theory qemu shouldn't be

     * able to access it anyway because the Bus Master bit in the PCI command

     * register isn't set. This is complete nonsense, but it used to be pretty

     * good at confusing and occasionally crashing qemu. */

    PrdtEntry prdt[4096] = { };

    status = send_dma_request(CMD_READ_DMA | CMDF_NO_BM, 0, 512,

                              prdt, ARRAY_SIZE(prdt), NULL);

    /* Not entirely clear what the expected result is, but this is what we get

     * in practice. At least we want to be aware of any changes. */

    g_assert_cmphex(status, ==, BM_STS_ACTIVE | BM_STS_INTR);

    assert_bit_clear(qpci_io_readb(dev, ide_base + reg_status), DF | ERR);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 void memory_region_sync_dirty_bitmap(MemoryRegion *mr)

+{

     FlatRange *fr;

void memory_region_sync_dirty_bitmap(MemoryRegion *mr)

{

    FlatRange *fr;

    FOR_EACH_FLAT_RANGE(fr, &address_space_memory.current_map) {

        if (fr->mr == mr) {

            MEMORY_LISTENER_UPDATE_REGION(fr, &address_space_memory,

                                          Forward, log_sync);

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static int get_coc(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)

+{
+
     int compno;
+

     if (s->buf_end - s->buf < 2)

static int get_coc(J2kDecoderContext *s, J2kCodingStyle *c, uint8_t *properties)

{

    int compno;

    if (s->buf_end - s->buf < 2)

        return AVERROR(EINVAL);

    compno = bytestream_get_byte(&s->buf);

    c += compno;

    c->csty = bytestream_get_byte(&s->buf);

    get_cox(s, c);

    properties[compno] |= HAD_COC;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -6,8 +6,8 @@

 {

+    MotionEstContext * const c= &s->me;
+
     me_cmp_func cmpf, chroma_cmpf;

     int next_dir=-1;

static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, int dmin,

                                       int src_index, int ref_index, int const penalty_factor,

                                       int size, int h, int flags)

{

    MotionEstContext * const c= &s->me;

    me_cmp_func cmpf, chroma_cmpf;

    int next_dir=-1;

    LOAD_COMMON

    LOAD_COMMON2

    unsigned map_generation = c->map_generation;

    cmpf        = s->mecc.me_cmp[size];

    chroma_cmpf = s->mecc.me_cmp[size + 1];

    { /* ensure that the best point is in the MAP as h/qpel refinement needs it */

        const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;

        const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);

        if(map[index]!=key){ //this will be executed only very rarey

            score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);

            map[index]= key;

        }

    }

    for(;;){

        int d;

        const int dir= next_dir;

        const int x= best[0];

        const int y= best[1];

        next_dir=-1;

        if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y  , 0)

        if(dir!=3 && y>ymin) CHECK_MV_DIR(x  , y-1, 1)

        if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y  , 2)

        if(dir!=1 && y<ymax) CHECK_MV_DIR(x  , y+1, 3)

        if(next_dir==-1){

            return dmin;

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

 static int make_ydt15_entry(int p1, int p2, int16_t *ydt)

+#endif

 {

static int make_ydt15_entry(int p2, int p1, int16_t *ydt)

#else

static int make_ydt15_entry(int p1, int p2, int16_t *ydt)

#endif

{

    int lo, hi;

    lo = ydt[p1];

    lo += (lo * 32) + (lo * 1024);

    hi = ydt[p2];

    hi += (hi * 32) + (hi * 1024);

    return (lo + (hi * (1 << 16))) * 2;

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@

     omap_update_display(opaque);
+
+    if (omap_lcd && surface_data(surface))
+
+        omap_ppm_save(filename, surface_data(surface),
+
                     omap_lcd->width, omap_lcd->height,

                     surface_stride(surface), errp);

static void omap_screen_dump(void *opaque, const char *filename, bool cswitch,

                             Error **errp)

{

    struct omap_lcd_panel_s *omap_lcd = opaque;

    DisplaySurface *surface = qemu_console_surface(omap_lcd->con);

    omap_update_display(opaque);

    if (omap_lcd && surface_data(surface))

        omap_ppm_save(filename, surface_data(surface),

                    omap_lcd->width, omap_lcd->height,

                    surface_stride(surface), errp);

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)
+
 {

     return cpu_inl(addr & IOPORTS_MASK);

static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr)

{

    return cpu_inl(addr & IOPORTS_MASK);

}


--- a/source.c
+++ b/source.c
@@ -16,8 +16,8 @@

         v = readw(s->mmio_cpu_base + port);

+    }
+
+    return bswap16(v);
+
+}

static uint16_t qpci_spapr_io_readw(QPCIBus *bus, void *addr)

{

    QPCIBusSPAPR *s = container_of(bus, QPCIBusSPAPR, bus);

    uint64_t port = (uintptr_t)addr;

    uint16_t v;

    if (port < s->pio.size) {

        v = readw(s->pio_cpu_base + port);

    } else {

        v = readw(s->mmio_cpu_base + port);

    }

    return bswap16(v);

}


--- a/source.c
+++ b/source.c
@@ -7,9 +7,9 @@
     avio_wb32(pb, 0);

     ffio_wfourcc(pb, "wfex");
+
+    ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+
     return update_size(pb, pos);

 }

static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)

{

    int64_t pos = avio_tell(pb);

    avio_wb32(pb, 0);

    ffio_wfourcc(pb, "wfex");

    ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);

    return update_size(pb, pos);

}


--- a/source.c
+++ b/source.c
@@ -14,11 +14,11 @@
         len = read(s->qmp_fd, &c, 1);
         if (len == -1 && errno == EINTR) {
             continue;
+        switch (c) {
+        case '{':
+            nesting++;
+            has_reply = true;
+            break;
         case '}':
             nesting--;
             break;

void qtest_qmp(QTestState *s, const char *fmt, ...)
{
    va_list ap;
    bool has_reply = false;
    int nesting = 0;
    /* Send QMP request */
    va_start(ap, fmt);
    socket_sendf(s->qmp_fd, fmt, ap);
    va_end(ap);
    /* Receive reply */
    while (!has_reply || nesting > 0) {
        ssize_t len;
        char c;
        len = read(s->qmp_fd, &c, 1);
        if (len == -1 && errno == EINTR) {
            continue;
        switch (c) {
        case '{':
            nesting++;
            has_reply = true;
            break;
        case '}':
            nesting--;
            break;


--- a/source.c
+++ b/source.c
@@ -5,11 +5,11 @@
 {

     BlockDriver *drv = bs->drv;
+
+
+
+    if (!drv)
+
         return -ENOMEDIUM;

     if (!drv->bdrv_pread)

int bdrv_pread(BlockDriverState *bs, int64_t offset,

               void *buf1, int count1)

{

    BlockDriver *drv = bs->drv;

    if (!drv)

        return -ENOMEDIUM;

    if (!drv->bdrv_pread)

        return bdrv_pread_em(bs, offset, buf1, count1);

    return drv->bdrv_pread(bs, offset, buf1, count1);

}


static int proxy_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size)

{

    int retval;

    retval = v9fs_request(ctx->private, T_TRUNCATE, NULL, "sq", fs_path, size);

    if (retval < 0) {

        errno = -retval;

        return -1;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -4,11 +4,11 @@
     dev_st = get_boot_device(0);
     if (dev_st) {
         VirtioCcwDevice *virtio_ccw_dev = (VirtioCcwDevice *)
+            object_dynamic_cast(OBJECT(qdev_get_parent_bus(dev_st)->parent),
+                TYPE_VIRTIO_CCW_DEVICE);
+        SCSIDevice *sd = (SCSIDevice *) object_dynamic_cast(OBJECT(dev_st),
+                                                            TYPE_SCSI_DEVICE);
+        if (virtio_ccw_dev) {
             CcwDevice *ccw_dev = CCW_DEVICE(virtio_ccw_dev);
             ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_CCW_LEN);
             ipl->iplb.blk0_len =

static bool s390_gen_initial_iplb(S390IPLState *ipl)
{
    DeviceState *dev_st;
    dev_st = get_boot_device(0);
    if (dev_st) {
        VirtioCcwDevice *virtio_ccw_dev = (VirtioCcwDevice *)
            object_dynamic_cast(OBJECT(qdev_get_parent_bus(dev_st)->parent),
                TYPE_VIRTIO_CCW_DEVICE);
        SCSIDevice *sd = (SCSIDevice *) object_dynamic_cast(OBJECT(dev_st),
                                                            TYPE_SCSI_DEVICE);
        if (virtio_ccw_dev) {
            CcwDevice *ccw_dev = CCW_DEVICE(virtio_ccw_dev);
            ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_CCW_LEN);
            ipl->iplb.blk0_len =
                cpu_to_be32(S390_IPLB_MIN_CCW_LEN - S390_IPLB_HEADER_LEN);
            ipl->iplb.pbt = S390_IPL_TYPE_CCW;
            ipl->iplb.ccw.devno = cpu_to_be16(ccw_dev->sch->devno);
            ipl->iplb.ccw.ssid = ccw_dev->sch->ssid & 3;
            return true;
        } else if (sd) {
            SCSIBus *bus = scsi_bus_from_device(sd);
            VirtIOSCSI *vdev = container_of(bus, VirtIOSCSI, bus);
            VirtIOSCSICcw *scsi_ccw = container_of(vdev, VirtIOSCSICcw, vdev);
            CcwDevice *ccw_dev = CCW_DEVICE(scsi_ccw);
            ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_QEMU_SCSI_LEN);
            ipl->iplb.blk0_len =
                cpu_to_be32(S390_IPLB_MIN_QEMU_SCSI_LEN - S390_IPLB_HEADER_LEN);
            ipl->iplb.pbt = S390_IPL_TYPE_QEMU_SCSI;
            ipl->iplb.scsi.lun = cpu_to_be32(sd->lun);
            ipl->iplb.scsi.target = cpu_to_be16(sd->id);
            ipl->iplb.scsi.channel = cpu_to_be16(sd->channel);
            ipl->iplb.scsi.devno = cpu_to_be16(ccw_dev->sch->devno);
            ipl->iplb.scsi.ssid = ccw_dev->sch->ssid & 3;
            return true;
    return false;


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void icount_adjust_rt(void *opaque)

+{
+
     timer_mod(icount_rt_timer,

               qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);

static void icount_adjust_rt(void *opaque)

{

    timer_mod(icount_rt_timer,

              qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_RT) + 1000);

    icount_adjust();

}


--- a/source.c
+++ b/source.c
@@ -12,7 +12,7 @@

         fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;

+        fdctrl->status0 = status0;

         return;

static void fdctrl_raise_irq(FDCtrl *fdctrl, uint8_t status0)

{

    /* Sparc mutation */

    if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) {

        /* XXX: not sure */

        fdctrl->msr &= ~FD_MSR_CMDBUSY;

        fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;

        fdctrl->status0 = status0;

        return;

    }

    if (!(fdctrl->sra & FD_SRA_INTPEND)) {

        qemu_set_irq(fdctrl->irq, 1);

        fdctrl->sra |= FD_SRA_INTPEND;

    }

    if (status0 & FD_SR0_SEEK) {

        FDrive *cur_drv;

        /* A seek clears the disk change line (if a disk is inserted) */

        cur_drv = get_cur_drv(fdctrl);

        if (cur_drv->max_track) {

            cur_drv->media_changed = 0;

        }

    }

    fdctrl->reset_sensei = 0;

    fdctrl->status0 = status0;

    FLOPPY_DPRINTF("Set interrupt status to 0x%02x\n", fdctrl->status0);

}


--- a/source.c
+++ b/source.c
@@ -15,11 +15,11 @@

     /* Attach a menelaus PM chip */
+
+    dev = i2c_create_slave(s->i2c, "twl92230", N8X0_MENELAUS_ADDR);
+
+    qdev_connect_gpio_out(dev, 3, s->cpu->irq[0][OMAP_INT_24XX_SYS_NIRQ]);
+

     /* Attach a TMP105 PM chip (A0 wired to ground) */

static void n8x0_i2c_setup(struct n800_s *s)

{

    DeviceState *dev;

    qemu_irq tmp_irq = qdev_get_gpio_in(s->cpu->gpio, N8X0_TMP105_GPIO);

    /* Attach the CPU on one end of our I2C bus.  */

    s->i2c = omap_i2c_bus(s->cpu->i2c[0]);

    /* Attach a menelaus PM chip */

    dev = i2c_create_slave(s->i2c, "twl92230", N8X0_MENELAUS_ADDR);

    qdev_connect_gpio_out(dev, 3, s->cpu->irq[0][OMAP_INT_24XX_SYS_NIRQ]);

    /* Attach a TMP105 PM chip (A0 wired to ground) */

    dev = i2c_create_slave(s->i2c, "tmp105", N8X0_TMP105_ADDR);

    qdev_connect_gpio_out(dev, 0, tmp_irq);

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@

     for (i = 0; i < PCI_SLOT_MAX; i++) {
+
+        pbdev = s->pbdev[i];
+
+        if (!pbdev) {
+
             continue;

         }

static S390PCIBusDevice *s390_pci_find_dev_by_uid(uint16_t uid)

{

    int i;

    S390PCIBusDevice *pbdev;

    S390pciState *s = s390_get_phb();

    for (i = 0; i < PCI_SLOT_MAX; i++) {

        pbdev = s->pbdev[i];

        if (!pbdev) {

            continue;

        }

        if (pbdev->uid == uid) {

            return pbdev;

        }

    }

    return NULL;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
+void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...))
+
+{
+
+    unsigned int i;
+

+
     for (i = 0; i < TRACE_BUF_LEN; i++) {

         TraceRecord record;

void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...))

{

    unsigned int i;

    for (i = 0; i < TRACE_BUF_LEN; i++) {

        TraceRecord record;

        if (!get_trace_record(i, &record)) {

            continue;

        }

        stream_printf(stream, "Event %" PRIu64 " : %" PRIx64 " %" PRIx64

                      " %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 "\n",

                      record.event, record.x1, record.x2,

                      record.x3, record.x4, record.x5,

                      record.x6);

    }

}


--- a/source.c
+++ b/source.c
@@ -12,11 +12,11 @@

     char *bdref_key_dot;

+    const char *reference;
+
+
+
+    assert(pbs);

     assert(*pbs == NULL);

int bdrv_open_image(BlockDriverState **pbs, const char *filename,

                    QDict *options, const char *bdref_key, int flags,

                    bool allow_none, Error **errp)

{

    QDict *image_options;

    int ret;

    char *bdref_key_dot;

    const char *reference;

    assert(pbs);

    assert(*pbs == NULL);

    bdref_key_dot = g_strdup_printf("%s.", bdref_key);

    qdict_extract_subqdict(options, &image_options, bdref_key_dot);

    g_free(bdref_key_dot);

    reference = qdict_get_try_str(options, bdref_key);

    if (!filename && !reference && !qdict_size(image_options)) {

        if (allow_none) {

            ret = 0;

        } else {

            error_setg(errp, "A block device must be specified for \"%s\"",

                       bdref_key);

            ret = -EINVAL;

        }

        goto done;

    }

    ret = bdrv_open(pbs, filename, reference, image_options, flags, NULL, errp);

done:

    qdict_del(options, bdref_key);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -13,7 +13,7 @@
         !memcmp(&p->buf[16 - sizeof(endcode)], endcode, sizeof(endcode)))

         return AVPROBE_SCORE_MAX;
+
+    return 0;
+
+}

static int gxf_probe(AVProbeData *p) {

    static const uint8_t startcode[] = {0, 0, 0, 0, 1, 0xbc}; // start with map packet

    static const uint8_t endcode[] = {0, 0, 0, 0, 0xe1, 0xe2};

    if (p->buf_size < 16)

        return 0;

    if (!memcmp(p->buf, startcode, sizeof(startcode)) &&

        !memcmp(&p->buf[16 - sizeof(endcode)], endcode, sizeof(endcode)))

        return AVPROBE_SCORE_MAX;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -59,11 +59,11 @@

     sysbus_init_irq(dev, &s->rtc_irq);
+
+
+
+    iomemtype = cpu_register_io_memory(pxa2xx_rtc_readfn,
+
                     pxa2xx_rtc_writefn, s, DEVICE_NATIVE_ENDIAN);

     sysbus_init_mmio(dev, 0x10000, iomemtype);

static int pxa2xx_rtc_init(SysBusDevice *dev)

{

    PXA2xxRTCState *s = FROM_SYSBUS(PXA2xxRTCState, dev);

    struct tm tm;

    int wom;

    int iomemtype;

    s->rttr = 0x7fff;

    s->rtsr = 0;

    qemu_get_timedate(&tm, 0);

    wom = ((tm.tm_mday - 1) / 7) + 1;

    s->last_rcnr = (uint32_t) mktimegm(&tm);

    s->last_rdcr = (wom << 20) | ((tm.tm_wday + 1) << 17) |

            (tm.tm_hour << 12) | (tm.tm_min << 6) | tm.tm_sec;

    s->last_rycr = ((tm.tm_year + 1900) << 9) |

            ((tm.tm_mon + 1) << 5) | tm.tm_mday;

    s->last_swcr = (tm.tm_hour << 19) |

            (tm.tm_min << 13) | (tm.tm_sec << 7);

    s->last_rtcpicr = 0;

    s->last_hz = s->last_sw = s->last_pi = qemu_get_clock(rt_clock);

    s->rtc_hz    = qemu_new_timer(rt_clock, pxa2xx_rtc_hz_tick,    s);

    s->rtc_rdal1 = qemu_new_timer(rt_clock, pxa2xx_rtc_rdal1_tick, s);

    s->rtc_rdal2 = qemu_new_timer(rt_clock, pxa2xx_rtc_rdal2_tick, s);

    s->rtc_swal1 = qemu_new_timer(rt_clock, pxa2xx_rtc_swal1_tick, s);

    s->rtc_swal2 = qemu_new_timer(rt_clock, pxa2xx_rtc_swal2_tick, s);

    s->rtc_pi    = qemu_new_timer(rt_clock, pxa2xx_rtc_pi_tick,    s);

    sysbus_init_irq(dev, &s->rtc_irq);

    iomemtype = cpu_register_io_memory(pxa2xx_rtc_readfn,

                    pxa2xx_rtc_writefn, s, DEVICE_NATIVE_ENDIAN);

    sysbus_init_mmio(dev, 0x10000, iomemtype);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
+uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)
+
+{
+
     uint64_t val;

uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr)

{

    uint64_t val;

    spapr_tce_dma_read(dev, taddr, &val, sizeof(val));

    return tswap64(val);

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 int qemu_add_polling_cb(PollingFunc *func, void *opaque)
+
+{
+
+    PollingEntry **ppe, *pe;

     pe = g_malloc0(sizeof(PollingEntry));

int qemu_add_polling_cb(PollingFunc *func, void *opaque)

{

    PollingEntry **ppe, *pe;

    pe = g_malloc0(sizeof(PollingEntry));

    pe->func = func;

    pe->opaque = opaque;

    for(ppe = &first_polling_entry; *ppe != NULL; ppe = &(*ppe)->next);

    *ppe = pe;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -8,11 +8,11 @@

     if (report && (t->running_async || t->running_retry)) {

+        t->status = report;
+
+        xhci_xfer_report(t);
+
+    }

static int xhci_ep_nuke_one_xfer(XHCITransfer *t, TRBCCode report)

{

    int killed = 0;

    if (report && (t->running_async || t->running_retry)) {

        t->status = report;

        xhci_xfer_report(t);

    }

    if (t->running_async) {

        usb_cancel_packet(&t->packet);

        t->running_async = 0;

        killed = 1;

    }

    if (t->running_retry) {

        XHCIEPContext *epctx = t->xhci->slots[t->slotid-1].eps[t->epid-1];

        if (epctx) {

            epctx->retry = NULL;

            timer_del(epctx->kick_timer);

        }

        t->running_retry = 0;

        killed = 1;

    }

    g_free(t->trbs);

    t->trbs = NULL;

    t->trb_count = t->trb_alloced = 0;

    return killed;

}


--- a/source.c
+++ b/source.c
@@ -8,7 +8,7 @@

+    vmsvga_reset(s);

static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)

{

    s->scratch_size = SVGA_SCRATCH_SIZE;

    s->scratch = qemu_malloc(s->scratch_size * 4);

    vmsvga_reset(s);

    s->fifo_size = SVGA_FIFO_SIZE;

    s->fifo_offset = qemu_ram_alloc(s->fifo_size);

    s->fifo_ptr = qemu_get_ram_ptr(s->fifo_offset);

    vga_common_init(&s->vga, vga_ram_size);

    vga_init(&s->vga);

    vmstate_register(0, &vmstate_vga_common, &s->vga);

    s->vga.ds = graphic_console_init(vmsvga_update_display,

                                     vmsvga_invalidate_display,

                                     vmsvga_screen_dump,

                                     vmsvga_text_update, s);

    vga_init_vbe(&s->vga);

    rom_add_vga(VGABIOS_FILENAME);

}


--- a/source.c
+++ b/source.c
@@ -2,9 +2,9 @@

 {

+    TCGv_i64 tmp1 = tcg_temp_new_i64();

+    TCGv_i64 tmp2 = tcg_temp_new_i64();

static TCGv_i64 gen_mulu_i64_i32(TCGv a, TCGv b)

{

    TCGv_i64 tmp1 = tcg_temp_new_i64();

    TCGv_i64 tmp2 = tcg_temp_new_i64();

    tcg_gen_extu_i32_i64(tmp1, a);

    dead_tmp(a);

    tcg_gen_extu_i32_i64(tmp2, b);

    dead_tmp(b);

    tcg_gen_mul_i64(tmp1, tmp1, tmp2);

    tcg_temp_free_i64(tmp2);

    return tmp1;

}


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

     TTAContext *c = s->priv_data;

+    AVStream *st = s->streams[stream_index];

     int index = av_index_search_timestamp(st, timestamp, flags);

static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)

{

    TTAContext *c = s->priv_data;

    AVStream *st = s->streams[stream_index];

    int index = av_index_search_timestamp(st, timestamp, flags);

    if (index < 0)

        return -1;

    c->currentframe = index;

    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,28 +1,28 @@
+static target_ulong compute_tlbie_rb(target_ulong v, target_ulong r,
+
                                      target_ulong pte_index)
+
+{
+
     target_ulong rb, va_low;
+
+

+    rb = (v & ~0x7fULL) << 16; /* AVA field */

+    va_low = pte_index >> 3;
+
     if (v & HPTE64_V_SECONDARY) {
+
         va_low = ~va_low;

     }

+    /* xor vsid from AVA */

     if (!(v & HPTE64_V_1TB_SEG)) {

+        va_low ^= v >> 12;

     } else {

static target_ulong compute_tlbie_rb(target_ulong v, target_ulong r,

                                     target_ulong pte_index)

{

    target_ulong rb, va_low;

    rb = (v & ~0x7fULL) << 16; /* AVA field */

    va_low = pte_index >> 3;

    if (v & HPTE64_V_SECONDARY) {

        va_low = ~va_low;

    }

    /* xor vsid from AVA */

    if (!(v & HPTE64_V_1TB_SEG)) {

        va_low ^= v >> 12;

    } else {

        va_low ^= v >> 24;

    }

    va_low &= 0x7ff;

    if (v & HPTE64_V_LARGE) {

        rb |= 1;                         /* L field */

#if 0 /* Disable that P7 specific bit for now */

        if (r & 0xff000) {

            /* non-16MB large page, must be 64k */

            /* (masks depend on page size) */

            rb |= 0x1000;                /* page encoding in LP field */

            rb |= (va_low & 0x7f) << 16; /* 7b of VA in AVA/LP field */

            rb |= (va_low & 0xfe);       /* AVAL field */

        }

#endif

    } else {

        /* 4kB page */

        rb |= (va_low & 0x7ff) << 12;   /* remaining 11b of AVA */

    }

    rb |= (v >> 54) & 0x300;            /* B field */

    return rb;

}


--- a/source.c
+++ b/source.c
@@ -21,11 +21,11 @@
     if(is_block2){

         decode_coeff(dst+8, coeffs[1], 2, gb, vlc, q_ac1);
+
+        decode_coeff(dst+1, coeffs[2], 2, gb, vlc, q_ac1);
+
+    }else{
+
         decode_coeff(dst+1, coeffs[1], 2, gb, vlc, q_ac1);

         decode_coeff(dst+8, coeffs[2], 2, gb, vlc, q_ac1);

static inline void decode_subblock3(DCTELEM *dst, int code, const int is_block2, GetBitContext *gb, VLC *vlc,

                                    int q_dc, int q_ac1, int q_ac2)

{

    int coeffs[4];

    coeffs[0] = modulo_three_table[code][0];

    coeffs[1] = modulo_three_table[code][1];

    coeffs[2] = modulo_three_table[code][2];

    coeffs[3] = modulo_three_table[code][3];

    decode_coeff(dst  , coeffs[0], 3, gb, vlc, q_dc);

    if(is_block2){

        decode_coeff(dst+8, coeffs[1], 2, gb, vlc, q_ac1);

        decode_coeff(dst+1, coeffs[2], 2, gb, vlc, q_ac1);

    }else{

        decode_coeff(dst+1, coeffs[1], 2, gb, vlc, q_ac1);

        decode_coeff(dst+8, coeffs[2], 2, gb, vlc, q_ac1);

    }

    decode_coeff(dst+9, coeffs[3], 2, gb, vlc, q_ac2);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 size_t qcrypto_hash_digest_len(QCryptoHashAlgorithm alg)
+
+{

     if (alg >= G_N_ELEMENTS(qcrypto_hash_alg_size)) {

size_t qcrypto_hash_digest_len(QCryptoHashAlgorithm alg)

{

    if (alg >= G_N_ELEMENTS(qcrypto_hash_alg_size)) {

        return 0;

    }

    return qcrypto_hash_alg_size[alg];

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@
                 return AV_PIX_FMT_RGB555;

             case 24:
+
+                return AV_PIX_FMT_BGR24;
+
+            case 32:
+
                 return AV_PIX_FMT_0RGB32;

         }

static enum AVPixelFormat dshow_pixfmt(DWORD biCompression, WORD biBitCount)

{

    switch(biCompression) {

    case BI_BITFIELDS:

    case BI_RGB:

        switch(biBitCount) { /* 1-8 are untested */

            case 1:

                return AV_PIX_FMT_MONOWHITE;

            case 4:

                return AV_PIX_FMT_RGB4;

            case 8:

                return AV_PIX_FMT_RGB8;

            case 16:

                return AV_PIX_FMT_RGB555;

            case 24:

                return AV_PIX_FMT_BGR24;

            case 32:

                return AV_PIX_FMT_0RGB32;

        }

    }

    return avpriv_find_pix_fmt(ff_raw_pix_fmt_tags, biCompression); // all others

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

 {

+    const char *models[2];

void qemu_check_nic_model(NICInfo *nd, const char *model)

{

    const char *models[2];

    models[0] = model;

    models[1] = NULL;

    qemu_check_nic_model_list(nd, models, model);

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static int dot_product(const int16_t *a, const int16_t *b, int length)

 {
+
     int i, sum = 0;

static int dot_product(const int16_t *a, const int16_t *b, int length)

{

    int i, sum = 0;

    for (i = 0; i < length; i++) {

        int64_t prod = av_clipl_int32(MUL64(a[i], b[i]) << 1);

        sum = av_clipl_int32(sum + prod);

    }

    return sum;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 target_phys_addr_t cpu_get_phys_page_debug (CPUState *env, target_ulong addr)

+{

     mmu_ctx_t ctx;

target_phys_addr_t cpu_get_phys_page_debug (CPUState *env, target_ulong addr)

{

    mmu_ctx_t ctx;

    if (unlikely(get_physical_address(env, &ctx, addr, 0, ACCESS_INT, 1) != 0))

        return -1;

    return ctx.raddr & TARGET_PAGE_MASK;

}


static int cdxa_probe(AVProbeData *p)

{

    /* check file header */

    if (p->buf[0] == 'R' && p->buf[1] == 'I' &&

        p->buf[2] == 'F' && p->buf[3] == 'F' &&

        p->buf[8] == 'C' && p->buf[9] == 'D' &&

        p->buf[10] == 'X' && p->buf[11] == 'A')

        return AVPROBE_SCORE_MAX;

    else

        return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static void monitor_call_handler(Monitor *mon, const mon_cmd_t *cmd,

+                                 const QDict *params)

 {

static void monitor_call_handler(Monitor *mon, const mon_cmd_t *cmd,

                                 const QDict *params)

{

    QObject *data = NULL;

    cmd->mhandler.cmd_new(mon, params, &data);

    if (is_async_return(data)) {

        /*

         * Asynchronous commands have no initial return data but they can

         * generate errors.  Data is returned via the async completion handler.

         */

        if (monitor_ctrl_mode(mon) && monitor_has_error(mon)) {

            monitor_protocol_emitter(mon, NULL);

        }

    } else if (monitor_ctrl_mode(mon)) {

        /* Monitor Protocol */

        monitor_protocol_emitter(mon, data);

    } else {

        /* User Protocol */

         if (data)

            cmd->user_print(mon, data);

    }

    qobject_decref(data);

}


--- a/source.c
+++ b/source.c
@@ -28,11 +28,11 @@

      * Each rule contains a set of one or more statements, optionally

+     * preceeded by a single condition. If there's a condition, the rule
+
+     * starts with a '#'. Multiple conditions are merged between brackets,
+
+     * so there are never multiple conditions spread out over separate

      * statements. Generally, these conditions are bitrate limits (min/max)

real_parse_asm_rulebook(AVFormatContext *s, AVStream *orig_st,

                        const char *p)

{

    const char *end;

    int n_rules, odd = 0;

    AVStream *st;

    /**

     * The ASMRuleBook contains a list of comma-separated strings per rule,

     * and each rule is separated by a ;. The last one also has a ; at the

     * end so we can use it as delimiter.

     * Every rule occurs twice, once for when the RTSP packet header marker

     * is set and once for if it isn't. We only read the first because we

     * don't care much (that's what the "odd" variable is for).

     * Each rule contains a set of one or more statements, optionally

     * preceeded by a single condition. If there's a condition, the rule

     * starts with a '#'. Multiple conditions are merged between brackets,

     * so there are never multiple conditions spread out over separate

     * statements. Generally, these conditions are bitrate limits (min/max)

     * for multi-bitrate streams.

     */

    if (*p == '\"') p++;

    for (n_rules = 0; s->nb_streams < MAX_STREAMS;) {

        if (!(end = strchr(p, ';')))

            break;

        if (!odd && end != p) {

            if (n_rules > 0)

                st = add_dstream(s, orig_st);

            else

                st = orig_st;

            real_parse_asm_rule(st, p, end);

            n_rules++;

        }

        p = end + 1;

        odd ^= 1;

    }

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static void aio_timerlist_notify(void *opaque)

+{

     aio_notify(opaque);

static void aio_timerlist_notify(void *opaque)

{

    aio_notify(opaque);

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void entropy_decode(APEContext *ctx, int blockstodecode, int stereo)

 {
+
+    int32_t *decoded0 = ctx->decoded[0];
+
+    int32_t *decoded1 = ctx->decoded[1];
+

     while (blockstodecode--) {

static void entropy_decode(APEContext *ctx, int blockstodecode, int stereo)

{

    int32_t *decoded0 = ctx->decoded[0];

    int32_t *decoded1 = ctx->decoded[1];

    while (blockstodecode--) {

        *decoded0++ = ape_decode_value(ctx, &ctx->riceY);

        if (stereo)

            *decoded1++ = ape_decode_value(ctx, &ctx->riceX);

    }

}


--- a/source.c
+++ b/source.c
@@ -3,9 +3,9 @@
 {

     if (val)
+
+        val |= E1000_ICR_INT_ASSERTED;
+
     s->mac_reg[ICR] = val;

     s->mac_reg[ICS] = val;

set_interrupt_cause(E1000State *s, int index, uint32_t val)

{

    if (val)

        val |= E1000_ICR_INT_ASSERTED;

    s->mac_reg[ICR] = val;

    s->mac_reg[ICS] = val;

    qemu_set_irq(s->dev.irq[0], (s->mac_reg[IMS] & s->mac_reg[ICR]) != 0);

}


--- a/source.c
+++ b/source.c
@@ -3,7 +3,7 @@
                                 const int16_t *in, int buffer_length,

                                 int filter_length, int stop_on_overflow,
+
                                 int shift, int rounder)

 {

int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,

                                const int16_t *in, int buffer_length,

                                int filter_length, int stop_on_overflow,

                                int shift, int rounder)

{

    int i,n;

    for (n = 0; n < buffer_length; n++) {

        int sum = -rounder, sum1;

        for (i = 1; i <= filter_length; i++)

            sum += filter_coeffs[i-1] * out[n-i];

        sum1 = ((-sum >> 12) + in[n]) >> shift;

        sum  = av_clip_int16(sum1);

        if (stop_on_overflow && sum != sum1)

            return 1;

        out[n] = sum;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -2,11 +2,11 @@

                    NetClientState *peer, Error **errp)

+{
+
+    /* FIXME error_setg(errp, ...) on failure */
+
+    struct slirp_config_str *config;

     char *vnet;

int net_init_slirp(const NetClientOptions *opts, const char *name,

                   NetClientState *peer, Error **errp)

{

    /* FIXME error_setg(errp, ...) on failure */

    struct slirp_config_str *config;

    char *vnet;

    int ret;

    const NetdevUserOptions *user;

    const char **dnssearch;

    assert(opts->kind == NET_CLIENT_OPTIONS_KIND_USER);

    user = opts->user;

    vnet = user->has_net ? g_strdup(user->net) :

           user->has_ip  ? g_strdup_printf("%s/24", user->ip) :

           NULL;

    dnssearch = slirp_dnssearch(user->dnssearch);

    /* all optional fields are initialized to "all bits zero" */

    net_init_slirp_configs(user->hostfwd, SLIRP_CFG_HOSTFWD);

    net_init_slirp_configs(user->guestfwd, 0);

    ret = net_slirp_init(peer, "user", name, user->q_restrict, vnet,

                         user->host, user->hostname, user->tftp,

                         user->bootfile, user->dhcpstart, user->dns, user->smb,

                         user->smbserver, dnssearch);

    while (slirp_configs) {

        config = slirp_configs;

        slirp_configs = config->next;

        g_free(config);

    }

    g_free(vnet);

    g_free(dnssearch);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+static int asf_read_generic_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,

                                   int type, AVDictionary **met)

@@ -11,7 +11,7 @@
     char buf[32];

+
     switch (type) {

     case ASF_BOOL:

static int asf_read_generic_value(AVFormatContext *s, uint8_t *name, uint16_t name_len,

                                  int type, AVDictionary **met)

{

    AVIOContext *pb = s->pb;

    uint64_t value;

    char buf[32];

    switch (type) {

    case ASF_BOOL:

        value = avio_rl32(pb);

        break;

    case ASF_DWORD:

        value = avio_rl32(pb);

        break;

    case ASF_QWORD:

        value = avio_rl64(pb);

        break;

    case ASF_WORD:

        value = avio_rl16(pb);

        break;

    default:

        av_freep(&name);

        return AVERROR_INVALIDDATA;

    }

    snprintf(buf, sizeof(buf), "%"PRIu64, value);

    if (av_dict_set(met, name, buf, 0) < 0)

        av_log(s, AV_LOG_WARNING, "av_dict_set failed.\n");

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -12,7 +12,7 @@

         }

+    }else{

         for(i=0; i<MAX_PICTURE_COUNT; i++){

int ff_find_unused_picture(MpegEncContext *s, int shared){

    int i;

    if(shared){

        for(i=0; i<MAX_PICTURE_COUNT; i++){

            if(s->picture[i].data[0]==NULL && s->picture[i].type==0) return i;

        }

    }else{

        for(i=0; i<MAX_PICTURE_COUNT; i++){

            if(s->picture[i].data[0]==NULL && s->picture[i].type!=0) return i; //FIXME

        }

        for(i=0; i<MAX_PICTURE_COUNT; i++){

            if(s->picture[i].data[0]==NULL) return i;

        }

    }

    assert(0);

    return -1;

}


--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)

 {

static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp)

{

    StackObject *tos = &qiv->stack[qiv->nb_stack - 1];

    assert(qiv->nb_stack > 0);

    if (qiv->strict) {

        GHashTable *const top_ht = tos->h;

        if (top_ht) {

            GHashTableIter iter;

            const char *key;

            g_hash_table_iter_init(&iter, top_ht);

            if (g_hash_table_iter_next(&iter, (void **)&key, NULL)) {

                error_setg(errp, QERR_QMP_EXTRA_MEMBER, key);

            }

            g_hash_table_unref(top_ht);

        }

        tos->h = NULL;

    }

    qiv->nb_stack--;

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@
         err = -ENOENT;
     dfidp = get_fid(pdu, dfid);
     if (dfidp == NULL) {
+        err = -EINVAL;
+    err = v9fs_co_symlink(pdu, dfidp, &name, symname.data, gid, &stbuf);
+    if (err < 0) {
+        goto out;
+    stat_to_qid(&stbuf, &qid);
     err =  pdu_marshal(pdu, offset, "Q", &qid);
     if (err < 0) {
         goto out;

static void v9fs_symlink(void *opaque)
{
    V9fsPDU *pdu = opaque;
    V9fsString name;
    V9fsString symname;
    V9fsFidState *dfidp;
    V9fsQID qid;
    struct stat stbuf;
    int32_t dfid;
    int err = 0;
    gid_t gid;
    size_t offset = 7;
    v9fs_string_init(&name);
    v9fs_string_init(&symname);
    err = pdu_unmarshal(pdu, offset, "dssd", &dfid, &name, &symname, &gid);
    if (err < 0) {
    trace_v9fs_symlink(pdu->tag, pdu->id, dfid, name.data, symname.data, gid);
    if (name_is_illegal(name.data)) {
        err = -ENOENT;
    dfidp = get_fid(pdu, dfid);
    if (dfidp == NULL) {
        err = -EINVAL;
    err = v9fs_co_symlink(pdu, dfidp, &name, symname.data, gid, &stbuf);
    if (err < 0) {
        goto out;
    stat_to_qid(&stbuf, &qid);
    err =  pdu_marshal(pdu, offset, "Q", &qid);
    if (err < 0) {
        goto out;
    err += offset;
    trace_v9fs_symlink_return(pdu->tag, pdu->id,
                              qid.type, qid.version, qid.path);
out:
    put_fid(pdu, dfidp);
out_nofid:
    pdu_complete(pdu, err);
    v9fs_string_free(&name);
    v9fs_string_free(&symname);


--- a/source.c
+++ b/source.c
@@ -1,15 +1,15 @@
 static void gen_tlbiva(DisasContext *ctx)
+
+{
+
+#if defined(CONFIG_USER_ONLY)

     gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

 #else

     TCGv t0;
+
     if (unlikely(ctx->pr)) {

         gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

static void gen_tlbiva(DisasContext *ctx)

{

#if defined(CONFIG_USER_ONLY)

    gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

#else

    TCGv t0;

    if (unlikely(ctx->pr)) {

        gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

        return;

    }

    t0 = tcg_temp_new();

    gen_addr_reg_index(ctx, t0);

    gen_helper_tlbiva(cpu_env, cpu_gpr[rB(ctx->opcode)]);

    tcg_temp_free(t0);

#endif

}


--- a/source.c
+++ b/source.c
@@ -1,12 +1,12 @@
 static ExitStatus gen_bcond(DisasContext *ctx, TCGCond cond, int ra,
+
                             int32_t disp, int mask)
+
+{

+    TCGv cmp_tmp;

+

     if (mask) {

static ExitStatus gen_bcond(DisasContext *ctx, TCGCond cond, int ra,

                            int32_t disp, int mask)

{

    TCGv cmp_tmp;

    if (mask) {

        cmp_tmp = tcg_temp_new();

        tcg_gen_andi_i64(cmp_tmp, load_gpr(ctx, ra), 1);

    } else {

        cmp_tmp = load_gpr(ctx, ra);

    }

    return gen_bcond_internal(ctx, cond, cmp_tmp, disp);

}


--- a/source.c
+++ b/source.c
@@ -33,11 +33,11 @@
 	if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0,

                            get_sp_from_cpustate(env)) == -EFAULT)
+
+		goto badframe;
+
+
+
         unlock_user_struct(frame, frame_addr, 0);

 	return eax;

long do_rt_sigreturn(CPUX86State *env)

{

        abi_ulong frame_addr;

	struct rt_sigframe *frame;

        sigset_t set;

	int eax;

        frame_addr = env->regs[R_ESP] - 4;

        if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1))

                goto badframe;

        target_to_host_sigset(&set, &frame->uc.tuc_sigmask);

        sigprocmask(SIG_SETMASK, &set, NULL);

	if (restore_sigcontext(env, &frame->uc.tuc_mcontext, &eax))

		goto badframe;

	if (do_sigaltstack(frame_addr + offsetof(struct rt_sigframe, uc.tuc_stack), 0,

                           get_sp_from_cpustate(env)) == -EFAULT)

		goto badframe;

        unlock_user_struct(frame, frame_addr, 0);

	return eax;

badframe:

        unlock_user_struct(frame, frame_addr, 0);

        force_sig(TARGET_SIGSEGV);

	return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
+static int libquvi_close(AVFormatContext *s)
+
+{
+
     LibQuviContext *qc = s->priv_data;

     if (qc->fmtctx)

static int libquvi_close(AVFormatContext *s)

{

    LibQuviContext *qc = s->priv_data;

    if (qc->fmtctx)

        avformat_close_input(&qc->fmtctx);

    return 0;

}


static void vnc_write_u8(VncState *vs, uint8_t value)

{

    vnc_write(vs, (char *)&value, 1);

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static ExitStatus trans_fop_wew_0e(DisasContext *ctx, uint32_t insn,

                                    const DisasInsn *di)
+
 {

     unsigned rt = assemble_rt64(insn);

static ExitStatus trans_fop_wew_0e(DisasContext *ctx, uint32_t insn,

                                   const DisasInsn *di)

{

    unsigned rt = assemble_rt64(insn);

    unsigned ra = assemble_ra64(insn);

    return do_fop_wew(ctx, rt, ra, di->f_wew);

}


--- a/source.c
+++ b/source.c
@@ -1,17 +1,17 @@
 static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
+
 {
+
     char *buffer;
+
+    int ret = -1;
+
     char *path = fs_path->data;

+

     if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||
+
         (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

         (fs_ctx->export_flags & V9FS_SM_NONE)) {

static int local_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)

{

    char *buffer;

    int ret = -1;

    char *path = fs_path->data;

    if ((credp->fc_uid == -1 && credp->fc_gid == -1) ||

        (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH) ||

        (fs_ctx->export_flags & V9FS_SM_NONE)) {

        buffer = rpath(fs_ctx, path);

        ret = lchown(buffer, credp->fc_uid, credp->fc_gid);

        g_free(buffer);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED) {

        buffer = rpath(fs_ctx, path);

        ret = local_set_xattr(buffer, credp);

        g_free(buffer);

    } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {

        return local_set_mapped_file_attr(fs_ctx, path, credp);

    }

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -16,11 +16,11 @@
     {
         av_log(s->avctx, AV_LOG_INFO, "Internal Error: q-matrix blocks must be 16-byte aligned "
                 "to use AltiVec DCT. Reverting to non-AltiVec version.\n");
+        return;
+    }
+    if (((long)(s->intra_scantable.inverse) & 0x0f) != 0)
+    {
+        av_log(s->avctx, AV_LOG_INFO, "Internal Error: scan table blocks must be 16-byte aligned "
                 "to use AltiVec DCT. Reverting to non-AltiVec version.\n");
         return;
     }

void MPV_common_init_altivec(MpegEncContext *s)
{
    if (s->avctx->lowres==0)
    {
        if ((s->avctx->idct_algo == FF_IDCT_AUTO) ||
                (s->avctx->idct_algo == FF_IDCT_ALTIVEC))
        {
            s->dsp.idct_put = idct_put_altivec;
            s->dsp.idct_add = idct_add_altivec;
            s->dsp.idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
        }
    }
    // Test to make sure that the dct required alignments are met.
    if ((((long)(s->q_intra_matrix) & 0x0f) != 0) ||
        (((long)(s->q_inter_matrix) & 0x0f) != 0))
    {
        av_log(s->avctx, AV_LOG_INFO, "Internal Error: q-matrix blocks must be 16-byte aligned "
                "to use AltiVec DCT. Reverting to non-AltiVec version.\n");
        return;
    }
    if (((long)(s->intra_scantable.inverse) & 0x0f) != 0)
    {
        av_log(s->avctx, AV_LOG_INFO, "Internal Error: scan table blocks must be 16-byte aligned "
                "to use AltiVec DCT. Reverting to non-AltiVec version.\n");
        return;
    }
    if ((s->avctx->dct_algo == FF_DCT_AUTO) ||
            (s->avctx->dct_algo == FF_DCT_ALTIVEC))
    {
#if 0 /* seems to cause trouble under some circumstances */
        s->dct_quantize = dct_quantize_altivec;
#endif
        s->dct_unquantize_h263_intra = dct_unquantize_h263_altivec;
        s->dct_unquantize_h263_inter = dct_unquantize_h263_altivec;
    }
}


--- a/source.c
+++ b/source.c
@@ -16,7 +16,7 @@

     } else if (strcmp(mode, "halt") == 0) {

+        shutdown_flag |= EWX_SHUTDOWN;

     } else if (strcmp(mode, "reboot") == 0) {

void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err)

{

    UINT shutdown_flag = EWX_FORCE;

    slog("guest-shutdown called, mode: %s", mode);

    if (!has_mode || strcmp(mode, "powerdown") == 0) {

        shutdown_flag |= EWX_POWEROFF;

    } else if (strcmp(mode, "halt") == 0) {

        shutdown_flag |= EWX_SHUTDOWN;

    } else if (strcmp(mode, "reboot") == 0) {

        shutdown_flag |= EWX_REBOOT;

    } else {

        error_set(err, QERR_INVALID_PARAMETER_VALUE, "mode",

                  "halt|powerdown|reboot");

        return;

    }

    /* Request a shutdown privilege, but try to shut down the system

       anyway. */

    acquire_privilege(SE_SHUTDOWN_NAME, err);

    if (error_is_set(err)) {

        return;

    }

    if (!ExitWindowsEx(shutdown_flag, SHTDN_REASON_FLAG_PLANNED)) {

        slog("guest-shutdown failed: %d", GetLastError());

        error_set(err, QERR_UNDEFINED_ERROR);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 void select_soundhw(const char *optarg)

 {
+
 }

void select_soundhw(const char *optarg)

{

}


--- a/source.c
+++ b/source.c
@@ -5,5 +5,5 @@
     /* 1k pages not implemented */

     env->CP0_PageMask = arg1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));
+
+}

void helper_mtc0_pagemask(CPUMIPSState *env, target_ulong arg1)

{

    /* 1k pages not implemented */

    env->CP0_PageMask = arg1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1));

}


--- a/source.c
+++ b/source.c
@@ -3,9 +3,9 @@
 {

     pdu_handler_t *handler;
+
+
+
     if (debug_9p_pdu) {

         pprint_pdu(pdu);

static void submit_pdu(V9fsState *s, V9fsPDU *pdu)

{

    pdu_handler_t *handler;

    if (debug_9p_pdu) {

        pprint_pdu(pdu);

    }

    BUG_ON(pdu->id >= ARRAY_SIZE(pdu_handlers));

    handler = pdu_handlers[pdu->id];

    BUG_ON(handler == NULL);

    handler(s, pdu);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 vcard_free(VCard *vcard)
+
+{
+
+    VCardApplet *current_applet = NULL;
+
     VCardApplet *next_applet = NULL;

vcard_free(VCard *vcard)

{

    VCardApplet *current_applet = NULL;

    VCardApplet *next_applet = NULL;

    if (vcard == NULL) {

        return;

    }

    vcard->reference_count--;

    if (vcard->reference_count != 0) {

        return;

    }

    if (vcard->vcard_private_free) {

        (*vcard->vcard_private_free)(vcard->vcard_private);

        vcard->vcard_private_free = 0;

        vcard->vcard_private = 0;

    }

    for (current_applet = vcard->applet_list; current_applet;

                                        current_applet = next_applet) {

        next_applet = current_applet->next;

        vcard_delete_applet(current_applet);

    }

    vcard_buffer_response_delete(vcard->vcard_buffer_response);

    g_free(vcard);

}


--- a/source.c
+++ b/source.c
@@ -39,11 +39,11 @@
          * msg->NumOOBDataElements;

          * msg->PerPacketInfoOffset;
+
+         * msg->PerPacketInfoLength;
+
+         * msg->VcHandle;
+
          * msg->Reserved;

          */

static ssize_t usbnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size)

{

    USBNetState *s = DO_UPCAST(NICState, nc, nc)->opaque;

    struct rndis_packet_msg_type *msg;

    if (s->rndis) {

        msg = (struct rndis_packet_msg_type *) s->in_buf;

        if (!s->rndis_state == RNDIS_DATA_INITIALIZED)

            return -1;

        if (size + sizeof(struct rndis_packet_msg_type) > sizeof(s->in_buf))

            return -1;

        memset(msg, 0, sizeof(struct rndis_packet_msg_type));

        msg->MessageType = cpu_to_le32(RNDIS_PACKET_MSG);

        msg->MessageLength = cpu_to_le32(size + sizeof(struct rndis_packet_msg_type));

        msg->DataOffset = cpu_to_le32(sizeof(struct rndis_packet_msg_type) - 8);

        msg->DataLength = cpu_to_le32(size);

        /* msg->OOBDataOffset;

         * msg->OOBDataLength;

         * msg->NumOOBDataElements;

         * msg->PerPacketInfoOffset;

         * msg->PerPacketInfoLength;

         * msg->VcHandle;

         * msg->Reserved;

         */

        memcpy(msg + 1, buf, size);

        s->in_len = size + sizeof(struct rndis_packet_msg_type);

    } else {

        if (size > sizeof(s->in_buf))

            return -1;

        memcpy(s->in_buf, buf, size);

        s->in_len = size;

    }

    s->in_ptr = 0;

    return size;

}


--- a/source.c
+++ b/source.c
@@ -9,11 +9,11 @@
     int eac3info, acmod, lfeon, bsmod;

+
+    if (c->fc->nb_streams < 1)
+
+        return 0;
+
     st = c->fc->streams[c->fc->nb_streams-1];

static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)

{

    AVStream *st;

    enum AVAudioServiceType *ast;

    int eac3info, acmod, lfeon, bsmod;

    if (c->fc->nb_streams < 1)

        return 0;

    st = c->fc->streams[c->fc->nb_streams-1];

    ast = (enum AVAudioServiceType*)ff_stream_new_side_data(st, AV_PKT_DATA_AUDIO_SERVICE_TYPE,

                                                            sizeof(*ast));

    if (!ast)

        return AVERROR(ENOMEM);

    /* No need to parse fields for additional independent substreams and its

     * associated dependent substreams since libavcodec's E-AC-3 decoder

     * does not support them yet. */

    avio_rb16(pb); /* data_rate and num_ind_sub */

    eac3info = avio_rb24(pb);

    bsmod = (eac3info >> 12) & 0x1f;

    acmod = (eac3info >>  9) & 0x7;

    lfeon = (eac3info >>  8) & 0x1;

    st->codec->channel_layout = avpriv_ac3_channel_layout_tab[acmod];

    if (lfeon)

        st->codec->channel_layout |= AV_CH_LOW_FREQUENCY;

    st->codec->channels = av_get_channel_layout_nb_channels(st->codec->channel_layout);

    *ast = bsmod;

    if (st->codec->channels > 1 && bsmod == 0x7)

        *ast = AV_AUDIO_SERVICE_TYPE_KARAOKE;

    st->codec->audio_service_type = *ast;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -14,11 +14,11 @@

             return i;

+    }
+
+    /* XXX:can we do that in mov too? */
+
+    if (!mp4)

         return 0;

int ff_mov_iso639_to_lang(const char *lang, int mp4)

{

    int i, code = 0;

    /* old way, only for QT? */

    for (i = 0; !mp4 && i < FF_ARRAY_ELEMS(mov_mdhd_language_map); i++) {

        if (mov_mdhd_language_map[i] && !strcmp(lang, mov_mdhd_language_map[i]))

            return i;

    }

    /* XXX:can we do that in mov too? */

    if (!mp4)

        return 0;

    /* handle undefined as such */

    if (lang[0] == '\0')

        lang = "und";

    /* 5bit ascii */

    for (i = 0; i < 3; i++) {

        unsigned char c = (unsigned char)lang[i];

        if (c < 0x60)

            return 0;

        if (c > 0x60 + 0x1f)

            return 0;

        code <<= 5;

        code |= (c - 0x60);

    }

    return code;

}


--- a/source.c
+++ b/source.c
@@ -4,7 +4,7 @@

     PerThreadContext *p;

+    atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL;

void ff_thread_report_progress(ThreadFrame *f, int n, int field)

{

    PerThreadContext *p;

    atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL;

    if (!progress ||

        atomic_load_explicit(&progress[field], memory_order_relaxed) >= n)

        return;

    p = f->owner[field]->internal->thread_ctx;

    if (f->owner[field]->debug&FF_DEBUG_THREADS)

        av_log(f->owner[field], AV_LOG_DEBUG,

               "%p finished %d field %d\n", progress, n, field);

    pthread_mutex_lock(&p->progress_mutex);

    atomic_store_explicit(&progress[field], n, memory_order_release);

    pthread_cond_broadcast(&p->progress_cond);

    pthread_mutex_unlock(&p->progress_mutex);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static int nvdec_vc1_end_frame(AVCodecContext *avctx)

 {
+
+    NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
+
     int ret = ff_nvdec_end_frame(avctx);

     ctx->bitstream = NULL;

static int nvdec_vc1_end_frame(AVCodecContext *avctx)

{

    NVDECContext *ctx = avctx->internal->hwaccel_priv_data;

    int ret = ff_nvdec_end_frame(avctx);

    ctx->bitstream = NULL;

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static uint8_t qvirtio_pci_get_status(QVirtioDevice *d)

+{

     QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;

static uint8_t qvirtio_pci_get_status(QVirtioDevice *d)

{

    QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;

    return qpci_io_readb(dev->pdev, dev->addr + VIRTIO_PCI_STATUS);

}


--- a/source.c
+++ b/source.c
@@ -4,11 +4,11 @@

 {

+    const char *name = qemu_opt_get(opts, "name");
+
+
+
+    if (name == NULL) {

         error_setg(errp, "chardev: spice channel: no name given");

static void qemu_chr_parse_spice_vmc(QemuOpts *opts, ChardevBackend *backend,

                                     Error **errp)

{

    const char *name = qemu_opt_get(opts, "name");

    if (name == NULL) {

        error_setg(errp, "chardev: spice channel: no name given");

        return;

    }

    backend->u.spicevmc = g_new0(ChardevSpiceChannel, 1);

    backend->u.spicevmc->type = g_strdup(name);

}


--- a/source.c
+++ b/source.c
@@ -7,10 +7,10 @@
     IscsiAIOCB *acb;
     acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque);
     trace_iscsi_aio_writev(iscsilun->iscsi, sector_num, nb_sectors, opaque, acb);
+    acb->iscsilun    = iscsilun;
+    acb->qiov        = qiov;
+    acb->nb_sectors  = nb_sectors;
+    acb->sector_num  = sector_num;
     acb->retries     = ISCSI_CMD_RETRIES;
     if (iscsi_aio_writev_acb(acb) != 0) {
         qemu_aio_release(acb);

iscsi_aio_writev(BlockDriverState *bs, int64_t sector_num,
                 QEMUIOVector *qiov, int nb_sectors,
                 BlockDriverCompletionFunc *cb,
                 void *opaque)
{
    IscsiLun *iscsilun = bs->opaque;
    IscsiAIOCB *acb;
    acb = qemu_aio_get(&iscsi_aiocb_info, bs, cb, opaque);
    trace_iscsi_aio_writev(iscsilun->iscsi, sector_num, nb_sectors, opaque, acb);
    acb->iscsilun    = iscsilun;
    acb->qiov        = qiov;
    acb->nb_sectors  = nb_sectors;
    acb->sector_num  = sector_num;
    acb->retries     = ISCSI_CMD_RETRIES;
    if (iscsi_aio_writev_acb(acb) != 0) {
        qemu_aio_release(acb);
    iscsi_set_events(iscsilun);
    return &acb->common;


--- a/source.c
+++ b/source.c
@@ -1,22 +1,22 @@
+static av_cold void init_mdct_win(TwinContext *tctx)
+
 {

     int i,j;

     const ModeTab *mtab = tctx->mtab;
+
     int size_s = mtab->size / mtab->fmode[FT_SHORT].sub;
+
     int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub;
+
+    int channels = tctx->avctx->channels;
+
+    float norm = channels == 1 ? 2. : 1.;

+    for (i = 0; i < 3; i++) {

         int bsize = tctx->mtab->size/tctx->mtab->fmode[i].sub;

static av_cold void init_mdct_win(TwinContext *tctx)

{

    int i,j;

    const ModeTab *mtab = tctx->mtab;

    int size_s = mtab->size / mtab->fmode[FT_SHORT].sub;

    int size_m = mtab->size / mtab->fmode[FT_MEDIUM].sub;

    int channels = tctx->avctx->channels;

    float norm = channels == 1 ? 2. : 1.;

    for (i = 0; i < 3; i++) {

        int bsize = tctx->mtab->size/tctx->mtab->fmode[i].sub;

        ff_mdct_init(&tctx->mdct_ctx[i], av_log2(bsize) + 1, 1,

                     -sqrt(norm/bsize) / (1<<15));

    }

    tctx->tmp_buf  = av_malloc(mtab->size            * sizeof(*tctx->tmp_buf));

    tctx->spectrum  = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->curr_frame = av_malloc(2*mtab->size*channels*sizeof(float));

    tctx->prev_frame  = av_malloc(2*mtab->size*channels*sizeof(float));

    for (i = 0; i < 3; i++) {

        int m = 4*mtab->size/mtab->fmode[i].sub;

        double freq = 2*M_PI/m;

        tctx->cos_tabs[i] = av_malloc((m/4)*sizeof(*tctx->cos_tabs));

        for (j = 0; j <= m/8; j++)

            tctx->cos_tabs[i][j] = cos((2*j + 1)*freq);

        for (j = 1; j <  m/8; j++)

            tctx->cos_tabs[i][m/4-j] = tctx->cos_tabs[i][j];

    }

    ff_init_ff_sine_windows(av_log2(size_m));

    ff_init_ff_sine_windows(av_log2(size_s/2));

    ff_init_ff_sine_windows(av_log2(mtab->size));

}


--- a/source.c
+++ b/source.c
@@ -35,11 +35,11 @@

     //DPRINTF("Writew reg 0x%02x = 0x%08x\n", (int)offset, val);
+
+    s->write_word_n++;
+
+    if (s->write_word_n == 2) {
+
         s->write_word_n = 0;

         lan9118_writel(s, offset & ~3, s->write_word_l +

static void lan9118_writew(void *opaque, target_phys_addr_t offset,

                           uint32_t val)

{

    lan9118_state *s = (lan9118_state *)opaque;

    offset &= 0xff;

    if (s->write_word_prev_offset != (offset & ~0x3)) {

        /* New offset, reset word counter */

        s->write_word_n = 0;

        s->write_word_prev_offset = offset & ~0x3;

    }

    if (offset & 0x2) {

        s->write_word_h = val;

    } else {

        s->write_word_l = val;

    }

    //DPRINTF("Writew reg 0x%02x = 0x%08x\n", (int)offset, val);

    s->write_word_n++;

    if (s->write_word_n == 2) {

        s->write_word_n = 0;

        lan9118_writel(s, offset & ~3, s->write_word_l +

                (s->write_word_h << 16), 4);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,15 +1,15 @@
 int boot_sector_init(char *fname)

+{

     int fd, ret;

     size_t len = sizeof boot_sector;

+
+
     fd = mkstemp(fname);
+
     if (fd < 0) {

         fprintf(stderr, "Couldn't open \"%s\": %s", fname, strerror(errno));

int boot_sector_init(char *fname)

{

    int fd, ret;

    size_t len = sizeof boot_sector;

    fd = mkstemp(fname);

    if (fd < 0) {

        fprintf(stderr, "Couldn't open \"%s\": %s", fname, strerror(errno));

        return 1;

    }

    /* For Open Firmware based system, we can use a Forth script instead */

    if (strcmp(qtest_get_arch(), "ppc64") == 0) {

        len = sprintf((char *)boot_sector, "\\ Bootscript\n%x %x c! %x %x c!\n",

                LOW(SIGNATURE), BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET,

                HIGH(SIGNATURE), BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET + 1);

    }

    ret = write(fd, boot_sector, len);

    close(fd);

    if (ret != len) {

        fprintf(stderr, "Could not write \"%s\"", fname);

        return 1;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
 static int match_group_separator(const OptionGroupDef *groups, const char *opt)

+{
+
+    const OptionGroupDef *p = groups;
+
+

     while (p->name) {

static int match_group_separator(const OptionGroupDef *groups, const char *opt)

{

    const OptionGroupDef *p = groups;

    while (p->name) {

        if (p->sep && !strcmp(p->sep, opt))

            return p - groups;

        p++;

    }

    return -1;

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@

     /* Free allocated memory buffers. */
+
+    av_free(q->mlt_window);
+
+    av_free(q->mlt_precos);
+
     av_free(q->mlt_presin);

     av_free(q->mlt_postcos);

static int cook_decode_close(AVCodecContext *avctx)

{

    int i;

    COOKContext *q = avctx->priv_data;

    av_log(NULL,AV_LOG_DEBUG, "Deallocating memory.\n");

    /* Free allocated memory buffers. */

    av_free(q->mlt_window);

    av_free(q->mlt_precos);

    av_free(q->mlt_presin);

    av_free(q->mlt_postcos);

    av_free(q->frame_reorder_index);

    av_free(q->frame_reorder_buffer);

    av_free(q->decoded_bytes_buffer);

    /* Free the transform. */

    ff_fft_end(&q->fft_ctx);

    /* Free the VLC tables. */

    for (i=0 ; i<13 ; i++) {

        free_vlc(&q->envelope_quant_index[i]);

    }

    for (i=0 ; i<7 ; i++) {

        free_vlc(&q->sqvh[i]);

    }

    if(q->nb_channels==2 && q->joint_stereo==1 ){

        free_vlc(&q->ccpl);

    }

    av_log(NULL,AV_LOG_DEBUG,"Memory deallocated.\n");

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int _stride){

     pixel *src = (pixel*)_src;
+
+    int stride = _stride/sizeof(pixel);
+
+    const pixel4 a= ((pixel4*)(src-stride))[0];
+
     ((pixel4*)(src+0*stride))[0]= a;

     ((pixel4*)(src+1*stride))[0]= a;

static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int _stride){

    pixel *src = (pixel*)_src;

    int stride = _stride/sizeof(pixel);

    const pixel4 a= ((pixel4*)(src-stride))[0];

    ((pixel4*)(src+0*stride))[0]= a;

    ((pixel4*)(src+1*stride))[0]= a;

    ((pixel4*)(src+2*stride))[0]= a;

    ((pixel4*)(src+3*stride))[0]= a;

}


--- a/source.c
+++ b/source.c
@@ -19,11 +19,11 @@

     if (iocb->aiocb) {
+
+        bdrv_aio_cancel_async(iocb->aiocb);
+
+        iocb->aiocb = NULL;
+
     }

 }

static void trim_aio_cancel(BlockAIOCB *acb)

{

    TrimAIOCB *iocb = container_of(acb, TrimAIOCB, common);

    /* Exit the loop so ide_issue_trim_cb will not continue  */

    iocb->j = iocb->qiov->niov - 1;

    iocb->i = (iocb->qiov->iov[iocb->j].iov_len / 8) - 1;

    iocb->ret = -ECANCELED;

    if (iocb->aiocb) {

        bdrv_aio_cancel_async(iocb->aiocb);

        iocb->aiocb = NULL;

    }

}


--- a/source.c
+++ b/source.c
@@ -3,7 +3,7 @@
                        const char *name, void *value, size_t size)

 {
+
     XattrOperations *xops = get_xattr_operations(ctx->xops, name);

     if (xops) {

ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,

                       const char *name, void *value, size_t size)

{

    XattrOperations *xops = get_xattr_operations(ctx->xops, name);

    if (xops) {

        return xops->getxattr(ctx, path, name, value, size);

    }

    errno = -EOPNOTSUPP;

    return -1;

}


--- a/source.c
+++ b/source.c
@@ -7,10 +7,10 @@
     ic = av_malloc(sizeof(AVFormatContext));

     if (!ic) return ic;
+
+    avformat_get_context_defaults(ic);
+
+    ic->av_class = &av_format_context_class;

     return ic;

AVFormatContext *avformat_alloc_context(void)

{

    AVFormatContext *ic;

    ic = av_malloc(sizeof(AVFormatContext));

    if (!ic) return ic;

    avformat_get_context_defaults(ic);

    ic->av_class = &av_format_context_class;

    return ic;

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@

     kroute.gsi = virq;
+
+    kroute.type = KVM_IRQ_ROUTING_MSI;
+
+    kroute.flags = 0;
+
     kroute.u.msi.address_lo = (uint32_t)msg.address;

     kroute.u.msi.address_hi = msg.address >> 32;

int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)

{

    struct kvm_irq_routing_entry kroute;

    int virq;

    if (!kvm_gsi_routing_enabled()) {

        return -ENOSYS;

    }

    virq = kvm_irqchip_get_virq(s);

    if (virq < 0) {

        return virq;

    }

    kroute.gsi = virq;

    kroute.type = KVM_IRQ_ROUTING_MSI;

    kroute.flags = 0;

    kroute.u.msi.address_lo = (uint32_t)msg.address;

    kroute.u.msi.address_hi = msg.address >> 32;

    kroute.u.msi.data = msg.data;

    kvm_add_routing_entry(s, &kroute);

    return virq;

}


--- a/source.c
+++ b/source.c
@@ -18,7 +18,7 @@

         int cpy_line_width = s->line_size[plane];

+        uint8_t *cpy_src1_data = td->copy_src1->data[plane];

         int cpy_src1_line_size = td->copy_src1->linesize[plane];

static int filter_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)

{

    FrameRateContext *s = ctx->priv;

    ThreadData *td = arg;

    uint16_t src1_factor = td->src1_factor;

    uint16_t src2_factor = td->src2_factor;

    int plane;

    for (plane = 0; plane < 4 && td->copy_src1->data[plane] && td->copy_src2->data[plane]; plane++) {

        int cpy_line_width = s->line_size[plane];

        uint8_t *cpy_src1_data = td->copy_src1->data[plane];

        int cpy_src1_line_size = td->copy_src1->linesize[plane];

        uint8_t *cpy_src2_data = td->copy_src2->data[plane];

        int cpy_src2_line_size = td->copy_src2->linesize[plane];

        int cpy_src_h = (plane > 0 && plane < 3) ? (td->copy_src1->height >> s->vsub) : (td->copy_src1->height);

        uint8_t *cpy_dst_data = s->work->data[plane];

        int cpy_dst_line_size = s->work->linesize[plane];

        const int start = (cpy_src_h *  job   ) / nb_jobs;

        const int end   = (cpy_src_h * (job+1)) / nb_jobs;

        cpy_src1_data += start * cpy_src1_line_size;

        cpy_src2_data += start * cpy_src2_line_size;

        cpy_dst_data += start * cpy_dst_line_size;

        s->blend(cpy_src1_data, cpy_src1_line_size,

                 cpy_src2_data, cpy_src2_line_size,

                 cpy_dst_data,  cpy_dst_line_size,

                 cpy_line_width, end - start,

                 src1_factor, src2_factor, s->max / 2, s->bitdepth);

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -23,8 +23,8 @@
         uint32_t packet_len = AV_RB32(ptr);

         int id;
+
+        /* The interleaving header is exactly 4 bytes, which happens to be

          * the same size as the packet length header from

static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st)

{

    RTSPState *rt = s->priv_data;

    AVFormatContext *rtpctx = rtsp_st->transport_priv;

    uint8_t *buf, *ptr;

    int size;

    uint8_t *interleave_header, *interleaved_packet;

    size = avio_close_dyn_buf(rtpctx->pb, &buf);

    ptr = buf;

    while (size > 4) {

        uint32_t packet_len = AV_RB32(ptr);

        int id;

        /* The interleaving header is exactly 4 bytes, which happens to be

         * the same size as the packet length header from

         * ffio_open_dyn_packet_buf. So by writing the interleaving header

         * over these bytes, we get a consecutive interleaved packet

         * that can be written in one call. */

        interleaved_packet = interleave_header = ptr;

        ptr += 4;

        size -= 4;

        if (packet_len > size || packet_len < 2)

            break;

        if (RTP_PT_IS_RTCP(ptr[1]))

            id = rtsp_st->interleaved_max; /* RTCP */

        else

            id = rtsp_st->interleaved_min; /* RTP */

        interleave_header[0] = '$';

        interleave_header[1] = id;

        AV_WB16(interleave_header + 2, packet_len);

        ffurl_write(rt->rtsp_hd_out, interleaved_packet, 4 + packet_len);

        ptr += packet_len;

        size -= packet_len;

    }

    av_free(buf);

    ffio_open_dyn_packet_buf(&rtpctx->pb, RTSP_TCP_MAX_PACKET_SIZE);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

 {

+    target_ulong tmp;

void op_subo (void)

{

    target_ulong tmp;

    tmp = T0;

    T0 = (int32_t)T0 - (int32_t)T1;

    if (!((T0 >> 31) ^ (T1 >> 31) ^ (tmp >> 31))) {

        CALL_FROM_TB1(do_raise_exception_direct, EXCP_OVERFLOW);

    }

    RETURN();

}


--- a/source.c
+++ b/source.c
@@ -2,11 +2,11 @@

                                                 uint64_t src_cluster_offset,

+                                                unsigned offset_in_cluster,
+
+                                                uint8_t *buffer,
+
+                                                unsigned bytes)

 {

static bool coroutine_fn do_perform_cow_encrypt(BlockDriverState *bs,

                                                uint64_t src_cluster_offset,

                                                unsigned offset_in_cluster,

                                                uint8_t *buffer,

                                                unsigned bytes)

{

    if (bytes && bs->encrypted) {

        BDRVQcow2State *s = bs->opaque;

        int64_t sector = (src_cluster_offset + offset_in_cluster)

                         >> BDRV_SECTOR_BITS;

        assert(s->cipher);

        assert((offset_in_cluster & ~BDRV_SECTOR_MASK) == 0);

        assert((bytes & ~BDRV_SECTOR_MASK) == 0);

        if (qcow2_encrypt_sectors(s, sector, buffer,

                                  bytes >> BDRV_SECTOR_BITS, true, NULL) < 0) {

            return false;

        }

    }

    return true;

}


--- a/source.c
+++ b/source.c
@@ -10,11 +10,11 @@

     StringOutputVisitor *ov;

+    char *str;
+
+    int i = 0;
+
+

void hmp_info_memdev(Monitor *mon, const QDict *qdict)

{

    Error *err = NULL;

    MemdevList *memdev_list = qmp_query_memdev(&err);

    MemdevList *m = memdev_list;

    StringOutputVisitor *ov;

    char *str;

    int i = 0;

    while (m) {

        ov = string_output_visitor_new(false);

        visit_type_uint16List(string_output_get_visitor(ov), NULL,

                              &m->value->host_nodes, NULL);

        monitor_printf(mon, "memory backend: %d\n", i);

        monitor_printf(mon, "  size:  %" PRId64 "\n", m->value->size);

        monitor_printf(mon, "  merge: %s\n",

                       m->value->merge ? "true" : "false");

        monitor_printf(mon, "  dump: %s\n",

                       m->value->dump ? "true" : "false");

        monitor_printf(mon, "  prealloc: %s\n",

                       m->value->prealloc ? "true" : "false");

        monitor_printf(mon, "  policy: %s\n",

                       HostMemPolicy_lookup[m->value->policy]);

        str = string_output_get_string(ov);

        monitor_printf(mon, "  host nodes: %s\n", str);

        g_free(str);

        string_output_visitor_cleanup(ov);

        m = m->next;

        i++;

    }

    monitor_printf(mon, "\n");

    qapi_free_MemdevList(memdev_list);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
+static int encode_end(AVCodecContext *avctx)
+
+{

     FFV1Context *s = avctx->priv_data;

static int encode_end(AVCodecContext *avctx)

{

    FFV1Context *s = avctx->priv_data;

    common_end(s);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -2,7 +2,7 @@

                            Node *nodes, int node,

+                           uint32_t pfx, int pl, int *pos)

 {

static void get_tree_codes(uint32_t *bits, int16_t *lens, uint8_t *xlat,

                           Node *nodes, int node,

                           uint32_t pfx, int pl, int *pos)

{

    int s;

    s = nodes[node].sym;

    if (s != -1) {

        bits[*pos] = (~pfx) & ((1U << FFMAX(pl, 1)) - 1);

        lens[*pos] = FFMAX(pl, 1);

        xlat[*pos] = s + (pl == 0);

        (*pos)++;

    } else {

        pfx <<= 1;

        pl++;

        get_tree_codes(bits, lens, xlat, nodes, nodes[node].l, pfx, pl,

                       pos);

        pfx |= 1;

        get_tree_codes(bits, lens, xlat, nodes, nodes[node].r, pfx, pl,

                       pos);

    }

}


--- a/source.c
+++ b/source.c
@@ -29,11 +29,11 @@

                 if (count == 0) {
+
+                    continue;
+
+                }
+

                 /* Got an entry! Submit and exit.  */

static void ide_issue_trim_cb(void *opaque, int ret)

{

    TrimAIOCB *iocb = opaque;

    if (ret >= 0) {

        while (iocb->j < iocb->qiov->niov) {

            int j = iocb->j;

            while (++iocb->i < iocb->qiov->iov[j].iov_len / 8) {

                int i = iocb->i;

                uint64_t *buffer = iocb->qiov->iov[j].iov_base;

                /* 6-byte LBA + 2-byte range per entry */

                uint64_t entry = le64_to_cpu(buffer[i]);

                uint64_t sector = entry & 0x0000ffffffffffffULL;

                uint16_t count = entry >> 48;

                if (count == 0) {

                    continue;

                }

                /* Got an entry! Submit and exit.  */

                iocb->aiocb = blk_aio_pdiscard(iocb->blk,

                                               sector << BDRV_SECTOR_BITS,

                                               count << BDRV_SECTOR_BITS,

                                               ide_issue_trim_cb, opaque);

                return;

            }

            iocb->j++;

            iocb->i = -1;

        }

    } else {

        iocb->ret = ret;

    }

    iocb->aiocb = NULL;

    if (iocb->bh) {

        qemu_bh_schedule(iocb->bh);

    }

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@
     case 0x500:

         /* KVM hypercall */
+
+
+        r = s390_virtio_hypercall(env);
+
+
         break;

     case 0x44:

void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)

{

    uint64_t r;

    switch (num) {

    case 0x500:

        /* KVM hypercall */

        r = s390_virtio_hypercall(env);

        break;

    case 0x44:

        /* yield */

        r = 0;

        break;

    case 0x308:

        /* ipl */

        handle_diag_308(env, r1, r3);

        r = 0;

        break;

    case 0x288:

        /* time bomb (watchdog) */

        r = handle_diag_288(env, r1, r3);

        break;

    default:

        r = -1;

        break;

    }

    if (r) {

        program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
+uint64_t helper_mulqv (uint64_t op1, uint64_t op2)
+
+{
+
+    uint64_t tl, th;

+

     muls64(&tl, &th, op1, op2);

uint64_t helper_mulqv (uint64_t op1, uint64_t op2)

{

    uint64_t tl, th;

    muls64(&tl, &th, op1, op2);

    /* If th != 0 && th != -1, then we had an overflow */

    if (unlikely((th + 1) > 1)) {

        arith_excp(env, GETPC(), EXC_M_IOV, 0);

    }

    return tl;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 static void event_notifier_dummy_cb(EventNotifier *e)
+
 {

 }

static void event_notifier_dummy_cb(EventNotifier *e)

{

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs)

 {
+
     bdrv_do_release_matching_dirty_bitmap(bs, NULL, true);

 }

void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs)

{

    bdrv_do_release_matching_dirty_bitmap(bs, NULL, true);

}