--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static int gen_rp_interrupts_init(PCIDevice *d, Error **errp)

+{

     int rc;
+

     rc = msix_init_exclusive_bar(d, GEN_PCIE_ROOT_PORT_MSIX_NR_VECTOR, 0);

static int gen_rp_interrupts_init(PCIDevice *d, Error **errp)

{

    int rc;

    rc = msix_init_exclusive_bar(d, GEN_PCIE_ROOT_PORT_MSIX_NR_VECTOR, 0);

    if (rc < 0) {

        assert(rc == -ENOTSUP);

        error_setg(errp, "Unable to init msix vectors");

    } else {

        msix_vector_use(d, 0);

    }

    return rc;

}


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

     /* The QOM tests will trigger tlb_flushes without setting up TCG

+     * so we bug out here in that case.

      */

static void tlb_flush_nocheck(CPUState *cpu)

{

    CPUArchState *env = cpu->env_ptr;

    /* The QOM tests will trigger tlb_flushes without setting up TCG

     * so we bug out here in that case.

     */

    if (!tcg_enabled()) {

        return;

    }

    assert_cpu_is_self(cpu);

    tlb_debug("(count: %d)\n", tlb_flush_count++);

    tb_lock();

    memset(env->tlb_table, -1, sizeof(env->tlb_table));

    memset(env->tlb_v_table, -1, sizeof(env->tlb_v_table));

    memset(cpu->tb_jmp_cache, 0, sizeof(cpu->tb_jmp_cache));

    env->vtlb_index = 0;

    env->tlb_flush_addr = -1;

    env->tlb_flush_mask = 0;

    tb_unlock();

    atomic_mb_set(&cpu->pending_tlb_flush, 0);

}


PPC_OP(setcrfbit)

{

    T1 = (T1 & PARAM(1)) | (T0 << PARAM(2));

    RETURN();

}


PPC_OP(subfc)

{

    T0 = T1 - T0;

    if (T0 <= T1) {

        xer_ca = 1;

    } else {

        xer_ca = 0;

    }

    RETURN();

}


static void tcx_rstip_writel(void *opaque, hwaddr addr,

                             uint64_t val, unsigned size)

{

    TCXState *s = opaque;

    int i;

    uint32_t col;

    if (!(addr & 4)) {

        s->tmpblit = val;

    } else {

        addr = (addr >> 3) & 0xfffff;

        col = cpu_to_be32(s->tmpblit);

        if (s->depth == 24) {

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

                if (val & 0x80000000) {

                    s->vram[addr + i] = s->tmpblit;

                    s->vram24[addr + i] = col;

                    s->cplane[addr + i] = col;

                }

                val <<= 1;

            }

        } else {

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

                if (val & 0x80000000) {

                    s->vram[addr + i] = s->tmpblit;

                }

                val <<= 1;

            }

        }

        memory_region_set_dirty(&s->vram_mem, addr, 32);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)

 {
+
+    uint32_t *ptr = (uint32_t *)jmp_addr;
+
+    uintptr_t disp = addr - jmp_addr;
+

     /* We can reach the entire address space for 32-bit.  For 64-bit

void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)

{

    uint32_t *ptr = (uint32_t *)jmp_addr;

    uintptr_t disp = addr - jmp_addr;

    /* We can reach the entire address space for 32-bit.  For 64-bit

       the code_gen_buffer can't be larger than 2GB.  */

    assert(disp == (int32_t)disp);

    *ptr = CALL | (uint32_t)disp >> 2;

    flush_icache_range(jmp_addr, jmp_addr + 4);

}


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

 {

+    audio_pcm_init_info (&hw->info, as);
+
     hw->samples = 1024;

     return 0;

static int no_init_in (HWVoiceIn *hw, audsettings_t *as)

{

    audio_pcm_init_info (&hw->info, as);

    hw->samples = 1024;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+qcrypto_tls_creds_x509_init(Object *obj)
 {
     object_property_add_bool(obj, "loaded",
                              qcrypto_tls_creds_x509_prop_get_loaded,

qcrypto_tls_creds_x509_init(Object *obj)
{
    object_property_add_bool(obj, "loaded",
                             qcrypto_tls_creds_x509_prop_get_loaded,
                             qcrypto_tls_creds_x509_prop_set_loaded,
}


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

     p->initrd_size = initrd_size;

+
+
+    qemu_register_reset(ppce500_reset_device_tree, p);
+
+

     /* Issue the device tree loader once, so that we get the size of the blob */

static int ppce500_prep_device_tree(MachineState *machine,

                                    PPCE500Params *params,

                                    hwaddr addr,

                                    hwaddr initrd_base,

                                    hwaddr initrd_size)

{

    DeviceTreeParams *p = g_new(DeviceTreeParams, 1);

    p->machine = machine;

    p->params = *params;

    p->addr = addr;

    p->initrd_base = initrd_base;

    p->initrd_size = initrd_size;

    qemu_register_reset(ppce500_reset_device_tree, p);

    /* Issue the device tree loader once, so that we get the size of the blob */

    return ppce500_load_device_tree(machine, params, addr, initrd_base,

                                    initrd_size, true);

}


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

                                   RAM_SAVE_FLAG_COMPRESS_PAGE);

+    blen = qemu_put_compression_data(param->file, p, TARGET_PAGE_SIZE,
+
+                                     migrate_compress_level());
+
+    bytes_sent += blen;

static int do_compress_ram_page(CompressParam *param)

{

    int bytes_sent, blen;

    uint8_t *p;

    RAMBlock *block = param->block;

    ram_addr_t offset = param->offset;

    p = block->host + (offset & TARGET_PAGE_MASK);

    bytes_sent = save_page_header(param->file, block, offset |

                                  RAM_SAVE_FLAG_COMPRESS_PAGE);

    blen = qemu_put_compression_data(param->file, p, TARGET_PAGE_SIZE,

                                     migrate_compress_level());

    bytes_sent += blen;

    return bytes_sent;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void send_qmp_error_event(BlockDriverState *bs,

                                  BlockErrorAction action,
+
+                                 bool is_read, int error)
+
+{
+
     IoOperationType optype;

static void send_qmp_error_event(BlockDriverState *bs,

                                 BlockErrorAction action,

                                 bool is_read, int error)

{

    IoOperationType optype;

    optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;

    qapi_event_send_block_io_error(bdrv_get_device_name(bs), optype, action,

                                   bdrv_iostatus_is_enabled(bs),

                                   error == ENOSPC, strerror(error),

                                   &error_abort);

}


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

     if (!drv) {
+
         return -ENOMEDIUM;

     }

static int coroutine_fn bdrv_co_do_readv(BlockDriverState *bs,

    int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)

{

    BlockDriver *drv = bs->drv;

    if (!drv) {

        return -ENOMEDIUM;

    }

    if (bdrv_check_request(bs, sector_num, nb_sectors)) {

        return -EIO;

    }

    /* throttling disk read I/O */

    if (bs->io_limits_enabled) {

        bdrv_io_limits_intercept(bs, false, nb_sectors);

    }

    return drv->bdrv_co_readv(bs, sector_num, nb_sectors, qiov);

}


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

 {

+    return lduw_phys_internal(addr, DEVICE_LITTLE_ENDIAN);

 }

uint32_t lduw_le_phys(target_phys_addr_t addr)

{

    return lduw_phys_internal(addr, DEVICE_LITTLE_ENDIAN);

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint)
+
 {

     qiov->iov = g_malloc(alloc_hint * sizeof(struct iovec));

void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint)

{

    qiov->iov = g_malloc(alloc_hint * sizeof(struct iovec));

    qiov->niov = 0;

    qiov->nalloc = alloc_hint;

    qiov->size = 0;

}


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

         error_report("Failed to write16 data to iSCSI lun. %s",

+                     iscsi_get_error(iscsi));
+
+        acb->status = -EIO;
+
+    }

iscsi_aio_write16_cb(struct iscsi_context *iscsi, int status,

                     void *command_data, void *opaque)

{

    IscsiAIOCB *acb = opaque;

    trace_iscsi_aio_write16_cb(iscsi, status, acb, acb->canceled);

    g_free(acb->buf);

    acb->buf = NULL;

    if (acb->canceled != 0) {

        return;

    }

    acb->status = 0;

    if (status < 0) {

        error_report("Failed to write16 data to iSCSI lun. %s",

                     iscsi_get_error(iscsi));

        acb->status = -EIO;

    }

    iscsi_schedule_bh(acb);

}


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

 {

+    if (!bs) {
+
+        return QTAILQ_FIRST(&graph_bdrv_states);

     }

BlockDriverState *bdrv_next_node(BlockDriverState *bs)

{

    if (!bs) {

        return QTAILQ_FIRST(&graph_bdrv_states);

    }

    return QTAILQ_NEXT(bs, node_list);

}


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

     n = s->nsector;
+
+    if (n > s->req_nb_sectors) {
+
+        n = s->req_nb_sectors;
+
     }

static void ide_sector_read_cb(void *opaque, int ret)

{

    IDEState *s = opaque;

    int n;

    s->pio_aiocb = NULL;

    s->status &= ~BUSY_STAT;

    if (ret == -ECANCELED) {

        return;

    }

    block_acct_done(bdrv_get_stats(s->bs), &s->acct);

    if (ret != 0) {

        if (ide_handle_rw_error(s, -ret, IDE_RETRY_PIO |

                                IDE_RETRY_READ)) {

            return;

        }

    }

    n = s->nsector;

    if (n > s->req_nb_sectors) {

        n = s->req_nb_sectors;

    }

    /* Allow the guest to read the io_buffer */

    ide_transfer_start(s, s->io_buffer, n * BDRV_SECTOR_SIZE, ide_sector_read);

    ide_set_irq(s->bus);

    ide_set_sector(s, ide_get_sector(s) + n);

    s->nsector -= n;

}


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

     BlockBackend *blk = child->opaque;
+

     if (blk->disable_perm) {

static int blk_root_inactivate(BdrvChild *child)

{

    BlockBackend *blk = child->opaque;

    if (blk->disable_perm) {

        return 0;

    }

    /* Only inactivate BlockBackends for guest devices (which are inactive at

     * this point because the VM is stopped) and unattached monitor-owned

     * BlockBackends. If there is still any other user like a block job, then

     * we simply can't inactivate the image. */

    if (!blk->dev && !blk->name[0]) {

        return -EPERM;

    }

    blk->disable_perm = true;

    if (blk->root) {

        bdrv_child_try_set_perm(blk->root, 0, BLK_PERM_ALL, &error_abort);

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 static int file_close_dir(URLContext *h)
+
+{
+
+#if HAVE_DIRENT_H

     FileContext *c = h->priv_data;

static int file_close_dir(URLContext *h)

{

#if HAVE_DIRENT_H

    FileContext *c = h->priv_data;

    closedir(c->dir);

    return 0;

#else

    return AVERROR(ENOSYS);

#endif /* HAVE_DIRENT_H */

}


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

     aio_set_fd_handler(bdrv_get_aio_context(client->bs), client->sock,

+                       NULL, NULL, NULL);
+
 }

void nbd_client_session_detach_aio_context(NbdClientSession *client)

{

    aio_set_fd_handler(bdrv_get_aio_context(client->bs), client->sock,

                       NULL, NULL, NULL);

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 static void tpm_display_backend_drivers(void)
+
 {
+
+    int i;

static void tpm_display_backend_drivers(void)

{

    int i;

    fprintf(stderr, "Supported TPM types (choose only one):\n");

    for (i = 0; i < TPM_MAX_DRIVERS && be_drivers[i] != NULL; i++) {

        fprintf(stderr, "%12s   %s\n",

                TpmType_lookup[be_drivers[i]->type], be_drivers[i]->desc());

    }

    fprintf(stderr, "\n");

}


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

         break;

+    }
+
+    MISC_DPRINTF("Read diagnostic LED reg 0x" TARGET_FMT_plx " = %x\n", addr,
+
+                 ret);

     return ret;

static uint32_t slavio_led_mem_reads(void *opaque, target_phys_addr_t addr)

{

    MiscState *s = opaque;

    uint32_t ret = 0, saddr;

    saddr = addr & LED_MAXADDR;

    switch (saddr) {

    case 0:

        ret = s->leds;

        break;

    default:

        break;

    }

    MISC_DPRINTF("Read diagnostic LED reg 0x" TARGET_FMT_plx " = %x\n", addr,

                 ret);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
+void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)
+
 {

 	unsigned i;

void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette)

{

	unsigned i;

	for(i=0; i<num_pixels; i++)

		((uint16_t *)dst)[i] = ((uint16_t *)palette)[ src[i] ];

}


--- a/source.c
+++ b/source.c
@@ -3,11 +3,11 @@
                             abi_ulong frame_addr, target_sigset_t *set)

 {
+
+    int i, err = 0;
+
+
+
     __put_user(on_sig_stack(frame_addr), &sc->sc_onstack);

     __put_user(set->sig[0], &sc->sc_mask);

static int setup_sigcontext(struct target_sigcontext *sc, CPUAlphaState *env,

                            abi_ulong frame_addr, target_sigset_t *set)

{

    int i, err = 0;

    __put_user(on_sig_stack(frame_addr), &sc->sc_onstack);

    __put_user(set->sig[0], &sc->sc_mask);

    __put_user(env->pc, &sc->sc_pc);

    __put_user(8, &sc->sc_ps);

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

        __put_user(env->ir[i], &sc->sc_regs[i]);

    }

    __put_user(0, &sc->sc_regs[31]);

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

        __put_user(env->fir[i], &sc->sc_fpregs[i]);

    }

    __put_user(0, &sc->sc_fpregs[31]);

    __put_user(cpu_alpha_load_fpcr(env), &sc->sc_fpcr);

    __put_user(0, &sc->sc_traparg_a0); /* FIXME */

    __put_user(0, &sc->sc_traparg_a1); /* FIXME */

    __put_user(0, &sc->sc_traparg_a2); /* FIXME */

    return err;

}


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

         dynarray_add(&s->chapters, &s->nb_chapters, chapter);
+
+    }
+
+    if(chapter->title)
+
         av_free(chapter->title);

     chapter->title = av_strdup(title);

AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title)

{

    AVChapter *chapter = NULL;

    int i;

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

        if(s->chapters[i]->id == id)

            chapter = s->chapters[i];

    if(!chapter){

        chapter= av_mallocz(sizeof(AVChapter));

        if(!chapter)

            return NULL;

        dynarray_add(&s->chapters, &s->nb_chapters, chapter);

    }

    if(chapter->title)

        av_free(chapter->title);

    chapter->title = av_strdup(title);

    chapter->id    = id;

    chapter->time_base= time_base;

    chapter->start = start;

    chapter->end   = end;

    return chapter;

}


--- a/source.c
+++ b/source.c
@@ -9,7 +9,7 @@
     /* MSR:POW cannot be set by any form of rfi */

     msr &= ~(1ULL << MSR_POW);
+

 #if defined(TARGET_PPC64)

static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong msr)

{

    CPUState *cs = CPU(ppc_env_get_cpu(env));

    /* MSR:POW cannot be set by any form of rfi */

    msr &= ~(1ULL << MSR_POW);

#if defined(TARGET_PPC64)

    /* Switching to 32-bit ? Crop the nip */

    if (!msr_is_64bit(env, msr)) {

        nip = (uint32_t)nip;

    }

#else

    nip = (uint32_t)nip;

#endif

    /* XXX: beware: this is false if VLE is supported */

    env->nip = nip & ~((target_ulong)0x00000003);

    hreg_store_msr(env, msr, 1);

#if defined(DEBUG_OP)

    cpu_dump_rfi(env->nip, env->msr);

#endif

    /* No need to raise an exception here,

     * as rfi is always the last insn of a TB

     */

    cs->interrupt_request |= CPU_INTERRUPT_EXITTB;

    /* Context synchronizing: check if TCG TLB needs flush */

    check_tlb_flush(env);

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@
             /* XXX: dummy values */
             stream->packet_max_size = 4096;
             stream->nb_packets = 0;
+            stream->total_frames = stream->nb_packets;
+            break;
+        default:
+            return -1;
+    if (rv10_write_header(s, 0, 0))
         return AVERROR_INVALIDDATA;
     avio_flush(s->pb);
     return 0;

static int rm_write_header(AVFormatContext *s)
{
    RMMuxContext *rm = s->priv_data;
    StreamInfo *stream;
    int n;
    AVCodecContext *codec;
    for(n=0;n<s->nb_streams;n++) {
        s->streams[n]->id = n;
        codec = s->streams[n]->codec;
        stream = &rm->streams[n];
        memset(stream, 0, sizeof(StreamInfo));
        stream->num = n;
        stream->bit_rate = codec->bit_rate;
        stream->enc = codec;
        switch(codec->codec_type) {
        case AVMEDIA_TYPE_AUDIO:
            rm->audio_stream = stream;
            stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size;
            /* XXX: dummy values */
            stream->packet_max_size = 1024;
            stream->nb_packets = 0;
            stream->total_frames = stream->nb_packets;
            break;
        case AVMEDIA_TYPE_VIDEO:
            rm->video_stream = stream;
            stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num;
            /* XXX: dummy values */
            stream->packet_max_size = 4096;
            stream->nb_packets = 0;
            stream->total_frames = stream->nb_packets;
            break;
        default:
            return -1;
    if (rv10_write_header(s, 0, 0))
        return AVERROR_INVALIDDATA;
    avio_flush(s->pb);
    return 0;


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 static void acpi_align_size(GArray *blob, unsigned align)
+
+{
+
+    /* Align size to multiple of given size. This reduces the chance

      * we need to change size in the future (breaking cross version migration).

static void acpi_align_size(GArray *blob, unsigned align)

{

    /* Align size to multiple of given size. This reduces the chance

     * we need to change size in the future (breaking cross version migration).

     */

    g_array_set_size(blob, (ROUND_UP(acpi_data_len(blob), align) +

                            g_array_get_element_size(blob) - 1) /

                             g_array_get_element_size(blob));

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void tcg_out_brcond64(TCGContext *s, TCGCond cond,
+
+                             TCGArg arg1, TCGArg arg2, int const_arg2,
+
                              int label_index, int small)

 {

static void tcg_out_brcond64(TCGContext *s, TCGCond cond,

                             TCGArg arg1, TCGArg arg2, int const_arg2,

                             int label_index, int small)

{

    tcg_out_cmp(s, arg1, arg2, const_arg2, P_REXW);

    tcg_out_jxx(s, tcg_cond_to_jcc[cond], label_index, small);

}


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

     ppcemb_timer = tb_env->opaque;

+    env->spr[SPR_40x_TSR] |= 1 << 27;
+
+    if ((env->spr[SPR_40x_TCR] >> 26) & 0x1)
+
+        ppc_set_irq(env, PPC_INTERRUPT_PIT, 1);

     start_stop_pit(env, tb_env, 1);

static void cpu_4xx_pit_cb (void *opaque)

{

    CPUState *env;

    ppc_tb_t *tb_env;

    ppcemb_timer_t *ppcemb_timer;

    env = opaque;

    tb_env = env->tb_env;

    ppcemb_timer = tb_env->opaque;

    env->spr[SPR_40x_TSR] |= 1 << 27;

    if ((env->spr[SPR_40x_TCR] >> 26) & 0x1)

        ppc_set_irq(env, PPC_INTERRUPT_PIT, 1);

    start_stop_pit(env, tb_env, 1);

    LOG_TB("%s: ar %d ir %d TCR " TARGET_FMT_lx " TSR " TARGET_FMT_lx " "

           "%016" PRIx64 "\n", __func__,

           (int)((env->spr[SPR_40x_TCR] >> 22) & 0x1),

           (int)((env->spr[SPR_40x_TCR] >> 26) & 0x1),

           env->spr[SPR_40x_TCR], env->spr[SPR_40x_TSR],

           ppcemb_timer->pit_reload);

}


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

    if (get_bits1(&s->gb)) /* Motion difference = 0 */
+
       return pred;

static int h263p_decode_umotion(MpegEncContext * s, int pred)

{

   int code = 0, sign;

   if (get_bits1(&s->gb)) /* Motion difference = 0 */

      return pred;

   code = 2 + get_bits1(&s->gb);

   while (get_bits1(&s->gb))

   {

      code <<= 1;

      code += get_bits1(&s->gb);

      if (code >= 32768) {

          avpriv_request_sample(s->avctx, "Huge DMV");

          return AVERROR_INVALIDDATA;

      }

   }

   sign = code & 1;

   code >>= 1;

   code = (sign) ? (pred - code) : (pred + code);

   ff_tlog(s->avctx,"H.263+ UMV Motion = %d\n", code);

   return code;

}


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

     if (unlikely((float64_is_infinity(farg1.d) && float64_is_zero(farg2.d)) ||
+
+                 (float64_is_zero(farg1.d) && float64_is_infinity(farg2.d)))) {
+
+        /* Multiplication of zero by infinity */
+
         farg1.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXIMZ);

     } else {

uint64_t helper_fmadd(CPUPPCState *env, uint64_t arg1, uint64_t arg2,

                      uint64_t arg3)

{

    CPU_DoubleU farg1, farg2, farg3;

    farg1.ll = arg1;

    farg2.ll = arg2;

    farg3.ll = arg3;

    if (unlikely((float64_is_infinity(farg1.d) && float64_is_zero(farg2.d)) ||

                 (float64_is_zero(farg1.d) && float64_is_infinity(farg2.d)))) {

        /* Multiplication of zero by infinity */

        farg1.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXIMZ);

    } else {

        if (unlikely(float64_is_signaling_nan(farg1.d) ||

                     float64_is_signaling_nan(farg2.d) ||

                     float64_is_signaling_nan(farg3.d))) {

            /* sNaN operation */

            fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN);

        }

        /* This is the way the PowerPC specification defines it */

        float128 ft0_128, ft1_128;

        ft0_128 = float64_to_float128(farg1.d, &env->fp_status);

        ft1_128 = float64_to_float128(farg2.d, &env->fp_status);

        ft0_128 = float128_mul(ft0_128, ft1_128, &env->fp_status);

        if (unlikely(float128_is_infinity(ft0_128) &&

                     float64_is_infinity(farg3.d) &&

                     float128_is_neg(ft0_128) != float64_is_neg(farg3.d))) {

            /* Magnitude subtraction of infinities */

            farg1.ll = fload_invalid_op_excp(env, POWERPC_EXCP_FP_VXISI);

        } else {

            ft1_128 = float64_to_float128(farg3.d, &env->fp_status);

            ft0_128 = float128_add(ft0_128, ft1_128, &env->fp_status);

            farg1.d = float128_to_float64(ft0_128, &env->fp_status);

        }

    }

    return farg1.ll;

}


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

     Visitor *v;

+
+
+    v = validate_test_init(data, "{ 'string': 'c', 'integer': 41, 'boolean': true }");
+
+

     visit_type_UserDefFlatUnion(v, &tmp, NULL, &err);

static void test_validate_fail_union_flat(TestInputVisitorData *data,

                                          const void *unused)

{

    UserDefFlatUnion *tmp = NULL;

    Error *err = NULL;

    Visitor *v;

    v = validate_test_init(data, "{ 'string': 'c', 'integer': 41, 'boolean': true }");

    visit_type_UserDefFlatUnion(v, &tmp, NULL, &err);

    g_assert(err);

    qapi_free_UserDefFlatUnion(tmp);

}


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

     st->codec->codec_type = CODEC_TYPE_VIDEO;

+    st->codec->codec_id = s->iformat->value;
+
+    st->need_parsing = 1;
+
+

     /* for mjpeg, specify frame rate */

static int video_read_header(AVFormatContext *s,

                             AVFormatParameters *ap)

{

    AVStream *st;

    st = av_new_stream(s, 0);

    if (!st)

        return AVERROR_NOMEM;

    st->codec->codec_type = CODEC_TYPE_VIDEO;

    st->codec->codec_id = s->iformat->value;

    st->need_parsing = 1;

    /* for mjpeg, specify frame rate */

    /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/

    if (ap && ap->time_base.num) {

        av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);

    } else if ( st->codec->codec_id == CODEC_ID_MJPEG ||

                st->codec->codec_id == CODEC_ID_MPEG4 ||

                st->codec->codec_id == CODEC_ID_H264) {

        av_set_pts_info(st, 64, 1, 25);

    }

    return 0;

}


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

 {

+    CharDriverState *chr;

     WinCharState *s;

static CharDriverState *qemu_chr_open_win_path(const char *filename)

{

    CharDriverState *chr;

    WinCharState *s;

    chr = qemu_chr_alloc();

    s = g_malloc0(sizeof(WinCharState));

    chr->opaque = s;

    chr->chr_write = win_chr_write;

    chr->chr_close = win_chr_close;

    if (win_chr_init(chr, filename) < 0) {

        g_free(s);

        g_free(chr);

        return NULL;

    }

    return chr;

}


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

     if (f->last_error) {
+
+        return;
+
+    }
+

     f->bytes_xfer += size;

void qemu_put_buffer_async(QEMUFile *f, const uint8_t *buf, int size)

{

    if (!f->ops->writev_buffer) {

        qemu_put_buffer(f, buf, size);

        return;

    }

    if (f->last_error) {

        return;

    }

    f->bytes_xfer += size;

    add_to_iovec(f, buf, size);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static void string_deserialize(void **native_out, void *datap,

+                               VisitorFunc visit, Error **errp)

 {

static void string_deserialize(void **native_out, void *datap,

                               VisitorFunc visit, Error **errp)

{

    StringSerializeData *d = datap;

    d->siv = string_input_visitor_new(string_output_get_string(d->sov));

    visit(string_input_get_visitor(d->siv), native_out, errp);

}


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

     uint8_t *conf = d->pci.config;

+
+
     d->name = object_get_typename(OBJECT(d));

static void intel_hda_realize(PCIDevice *pci, Error **errp)

{

    IntelHDAState *d = INTEL_HDA(pci);

    uint8_t *conf = d->pci.config;

    d->name = object_get_typename(OBJECT(d));

    pci_config_set_interrupt_pin(conf, 1);

    /* HDCTL off 0x40 bit 0 selects signaling mode (1-HDA, 0 - Ac97) 18.1.19 */

    conf[0x40] = 0x01;

    memory_region_init_io(&d->mmio, OBJECT(d), &intel_hda_mmio_ops, d,

                          "intel-hda", 0x4000);

    pci_register_bar(&d->pci, 0, 0, &d->mmio);

    if (d->msi != ON_OFF_AUTO_OFF) {

         /* TODO check for errors */

        msi_init(&d->pci, d->old_msi_addr ? 0x50 : 0x60, 1, true, false);

    }

    hda_codec_bus_init(DEVICE(pci), &d->codecs, sizeof(d->codecs),

                       intel_hda_response, intel_hda_xfer);

}


static void vc1_put_block(VC1Context *v, DCTELEM block[6][64])

{

    uint8_t *Y;

    int ys, us, vs;

    DSPContext *dsp = &v->s.dsp;

    if(v->rangeredfrm) {

        int i, j, k;

        for(k = 0; k < 6; k++)

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

                for(i = 0; i < 8; i++)

                    block[k][i + j*8] = (block[k][i + j*8] - 64) << 1;

    }

    ys = v->s.current_picture.linesize[0];

    us = v->s.current_picture.linesize[1];

    vs = v->s.current_picture.linesize[2];

    Y = v->s.dest[0];

    dsp->put_pixels_clamped(block[0], Y, ys);

    dsp->put_pixels_clamped(block[1], Y + 8, ys);

    Y += ys * 8;

    dsp->put_pixels_clamped(block[2], Y, ys);

    dsp->put_pixels_clamped(block[3], Y + 8, ys);

    if(!(v->s.flags & CODEC_FLAG_GRAY)) {

        dsp->put_pixels_clamped(block[4], v->s.dest[1], us);

        dsp->put_pixels_clamped(block[5], v->s.dest[2], vs);

    }

}


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

     }

+
+
+    gtk_window_set_title(GTK_WINDOW(s->window), title);
+
+

     g_free(title);

static void gd_update_caption(GtkDisplayState *s)

{

    const char *status = "";

    gchar *title;

    if (!runstate_is_running()) {

        status = " [Stopped]";

    }

    if (qemu_name) {

        title = g_strdup_printf("QEMU (%s)%s", qemu_name, status);

    } else {

        title = g_strdup_printf("QEMU%s", status);

    }

    gtk_window_set_title(GTK_WINDOW(s->window), title);

    g_free(title);

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
+void ff_avg_h264_qpel8_mc33_msa(uint8_t *dst, const uint8_t *src,
+
+                                ptrdiff_t stride)

 {

void ff_avg_h264_qpel8_mc33_msa(uint8_t *dst, const uint8_t *src,

                                ptrdiff_t stride)

{

    avc_luma_hv_qrt_and_aver_dst_8x8_msa(src + stride - 2,

                                         src - (stride * 2) +

                                         sizeof(uint8_t), stride, dst, stride);

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 static unsigned tget(GetByteContext *gb, int type, int le)
+
+{
+
+    switch (type) {

     case TIFF_BYTE : return bytestream2_get_byteu(gb);

static unsigned tget(GetByteContext *gb, int type, int le)

{

    switch (type) {

    case TIFF_BYTE : return bytestream2_get_byteu(gb);

    case TIFF_SHORT: return tget_short(gb, le);

    case TIFF_LONG : return tget_long(gb, le);

    default        : return UINT_MAX;

    }

}


--- a/source.c
+++ b/source.c
@@ -11,11 +11,11 @@
     if (qiv->errname) {

         g_string_truncate(qiv->errname, 0);
+
+    } else {
+
+        qiv->errname = g_string_new("");
+
     }

static const char *full_name(QObjectInputVisitor *qiv, const char *name)

{

    StackObject *so;

    char buf[32];

    if (qiv->errname) {

        g_string_truncate(qiv->errname, 0);

    } else {

        qiv->errname = g_string_new("");

    }

    QSLIST_FOREACH(so , &qiv->stack, node) {

        if (qobject_type(so->obj) == QTYPE_QDICT) {

            g_string_prepend(qiv->errname, name);

            g_string_prepend_c(qiv->errname, '.');

        } else {

            snprintf(buf, sizeof(buf), "[%u]", so->index);

            g_string_prepend(qiv->errname, buf);

        }

        name = so->name;

    }

    if (name) {

        g_string_prepend(qiv->errname, name);

    } else if (qiv->errname->str[0] == '.') {

        g_string_erase(qiv->errname, 0, 1);

    } else {

        return "<anonymous>";

    }

    return qiv->errname->str;

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
 static void migration_bitmap_sync(void)

 {
+
+    uint64_t num_dirty_pages_init = ram_list.dirty_pages;
+
+

     trace_migration_bitmap_sync_start();

static void migration_bitmap_sync(void)

{

    uint64_t num_dirty_pages_init = ram_list.dirty_pages;

    trace_migration_bitmap_sync_start();

    memory_global_sync_dirty_bitmap(get_system_memory());

    trace_migration_bitmap_sync_end(ram_list.dirty_pages

                                    - num_dirty_pages_init);

}


static void FUNCC(pred8x8l_horizontal_add)(uint8_t *_pix, const int16_t *_block,

                                           ptrdiff_t stride)

{

    int i;

    pixel *pix = (pixel*)_pix;

    const dctcoef *block = (const dctcoef*)_block;

    stride >>= sizeof(pixel)-1;

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

        pixel v = pix[-1];

        pix[0]= v += block[0];

        pix[1]= v += block[1];

        pix[2]= v += block[2];

        pix[3]= v += block[3];

        pix[4]= v += block[4];

        pix[5]= v += block[5];

        pix[6]= v += block[6];

        pix[7]= v +  block[7];

        pix+= stride;

        block+= 8;

    }

}


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

 {

+    float32 f0 = make_float32(a);
+
+    float32 f1 = make_float32(b);

     return float32_val((float32_compare_quiet(f0, f1, NFS) == 1)

uint32_t HELPER(neon_abd_f32)(uint32_t a, uint32_t b)

{

    float32 f0 = make_float32(a);

    float32 f1 = make_float32(b);

    return float32_val((float32_compare_quiet(f0, f1, NFS) == 1)

                    ? float32_sub(f0, f1, NFS)

                    : float32_sub(f1, f0, NFS));

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static inline uint16_t mipsdsp_sub_i16(int16_t a, int16_t b, CPUMIPSState *env)

 {
+
     int16_t  temp;

static inline uint16_t mipsdsp_sub_i16(int16_t a, int16_t b, CPUMIPSState *env)

{

    int16_t  temp;

    temp = a - b;

    if (MIPSDSP_OVERFLOW(a, -b, temp, 0x8000)) {

        set_DSPControl_overflow_flag(1, 20, env);

    }

    return temp;

}


--- a/source.c
+++ b/source.c
@@ -1,8 +1,8 @@
 START_TEST(qint_from_int64_test)
+
+{
+
+    QInt *qi;

     const int64_t value = 0x1234567890abcdefLL;

START_TEST(qint_from_int64_test)

{

    QInt *qi;

    const int64_t value = 0x1234567890abcdefLL;

    qi = qint_from_int(value);

    fail_unless((int64_t) qi->value == value);

    QDECREF(qi);

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static void cpu_request_exit(void *opaque, int irq, int level)
+
+{
+
     CPUState *cpu = current_cpu;

static void cpu_request_exit(void *opaque, int irq, int level)

{

    CPUState *cpu = current_cpu;

    if (cpu && level) {

        cpu_exit(cpu);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
+static QObject *qdict_get_obj(const QDict *qdict, const char *key, QType type)
+
+{
+
+    QObject *obj;
+

     obj = qdict_get(qdict, key);

static QObject *qdict_get_obj(const QDict *qdict, const char *key, QType type)

{

    QObject *obj;

    obj = qdict_get(qdict, key);

    assert(obj != NULL);

    assert(qobject_type(obj) == type);

    return obj;

}


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

     DiscardCo rwco = {

+        .bs = bs,

         .offset = offset,

int bdrv_pdiscard(BlockDriverState *bs, int64_t offset, int count)

{

    Coroutine *co;

    DiscardCo rwco = {

        .bs = bs,

        .offset = offset,

        .count = count,

        .ret = NOT_DONE,

    };

    if (qemu_in_coroutine()) {

        /* Fast-path if already in coroutine context */

        bdrv_pdiscard_co_entry(&rwco);

    } else {

        co = qemu_coroutine_create(bdrv_pdiscard_co_entry, &rwco);

        qemu_coroutine_enter(co);

        BDRV_POLL_WHILE(bs, rwco.ret == NOT_DONE);

    }

    return rwco.ret;

}


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

     /* throttling disk I/O */

+    if (blk->public.throttle_state) {
+
+        throttle_group_co_io_limits_intercept(blk, bytes, true);
+
+    }

int coroutine_fn blk_co_pwritev(BlockBackend *blk, int64_t offset,

                                unsigned int bytes, QEMUIOVector *qiov,

                                BdrvRequestFlags flags)

{

    int ret;

    trace_blk_co_pwritev(blk, blk_bs(blk), offset, bytes, flags);

    ret = blk_check_byte_request(blk, offset, bytes);

    if (ret < 0) {

        return ret;

    }

    /* throttling disk I/O */

    if (blk->public.throttle_state) {

        throttle_group_co_io_limits_intercept(blk, bytes, true);

    }

    if (!blk->enable_write_cache) {

        flags |= BDRV_REQ_FUA;

    }

    return bdrv_co_pwritev(blk_bs(blk), offset, bytes, qiov, flags);

}


static void rgb24_to_rgb555(AVPicture *dst, AVPicture *src,

                            int width, int height)

{

    const unsigned char *p;

    unsigned char *q;

    int r, g, b, dst_wrap, src_wrap;

    int x, y;

    p = src->data[0];

    src_wrap = src->linesize[0] - 3 * width;

    q = dst->data[0];

    dst_wrap = dst->linesize[0] - 2 * width;

    for(y=0;y<height;y++) {

        for(x=0;x<width;x++) {

            r = p[0];

            g = p[1];

            b = p[2];

            ((unsigned short *)q)[0] =

                ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | 0x8000;

            q += 2;

            p += 3;

        }

        p += src_wrap;

        q += dst_wrap;

    }

}


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

 {

+	struct tcpcb *tp = sototcpcb(so);
+
+
+
+	DEBUG_CALL("sorecvoob");

 	DEBUG_ARG("so = %p", so);

sorecvoob(struct socket *so)

{

	struct tcpcb *tp = sototcpcb(so);

	DEBUG_CALL("sorecvoob");

	DEBUG_ARG("so = %p", so);

	/*

	 * We take a guess at how much urgent data has arrived.

	 * In most situations, when urgent data arrives, the next

	 * read() should get all the urgent data.  This guess will

	 * be wrong however if more data arrives just after the

	 * urgent data, or the read() doesn't return all the

	 * urgent data.

	 */

	soread(so);

	tp->snd_up = tp->snd_una + so->so_snd.sb_cc;

	tp->t_force = 1;

	tcp_output(tp);

	tp->t_force = 0;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align,

+                              uint16_t index, uint16_t num)

 {

static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align,

                              uint16_t index, uint16_t num)

{

    VirtIODevice *vdev = virtio_ccw_get_vdev(sch);

    if (index > VIRTIO_PCI_QUEUE_MAX) {

        return -EINVAL;

    }

    /* Current code in virtio.c relies on 4K alignment. */

    if (addr && (align != 4096)) {

        return -EINVAL;

    }

    if (!vdev) {

        return -EINVAL;

    }

    virtio_queue_set_addr(vdev, index, addr);

    if (!addr) {

        virtio_queue_set_vector(vdev, index, 0);

    } else {

        /* Fail if we don't have a big enough queue. */

        /* TODO: Add interface to handle vring.num changing */

        if (virtio_queue_get_num(vdev, index) > num) {

            return -EINVAL;

        }

        virtio_queue_set_vector(vdev, index, index);

    }

    /* tell notify handler in case of config change */

    vdev->config_vector = VIRTIO_PCI_QUEUE_MAX;

    return 0;

}


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

     /* rectangles are AV_PIX_FMT_PAL8, but we have no guarantee that the
+
+       palettes for all rectangles are identical or compatible */
+
+    ist->resample_pix_fmt = ifilter->format = AV_PIX_FMT_RGB32;
+

     ist->sub2video.frame = av_frame_alloc();

static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)

{

    AVFormatContext *avf = input_files[ist->file_index]->ctx;

    int i, w, h;

    /* Compute the size of the canvas for the subtitles stream.

       If the subtitles codecpar has set a size, use it. Otherwise use the

       maximum dimensions of the video streams in the same file. */

    w = ifilter->width;

    h = ifilter->height;

    if (!(w && h)) {

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

            if (avf->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {

                w = FFMAX(w, avf->streams[i]->codecpar->width);

                h = FFMAX(h, avf->streams[i]->codecpar->height);

            }

        }

        if (!(w && h)) {

            w = FFMAX(w, 720);

            h = FFMAX(h, 576);

        }

        av_log(avf, AV_LOG_INFO, "sub2video: using %dx%d canvas\n", w, h);

    }

    ist->sub2video.w = ist->resample_width  = w;

    ist->sub2video.h = ist->resample_height = h;

    /* rectangles are AV_PIX_FMT_PAL8, but we have no guarantee that the

       palettes for all rectangles are identical or compatible */

    ist->resample_pix_fmt = ifilter->format = AV_PIX_FMT_RGB32;

    ist->sub2video.frame = av_frame_alloc();

    if (!ist->sub2video.frame)

        return AVERROR(ENOMEM);

    ist->sub2video.last_pts = INT64_MIN;

    return 0;

}


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

 {

+    VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
+
+
+
     if (((s->vdev.guest_features >> VIRTIO_SCSI_F_HOTPLUG) & 1) &&

         (s->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) {

static void virtio_scsi_hotplug(SCSIBus *bus, SCSIDevice *dev)

{

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

    if (((s->vdev.guest_features >> VIRTIO_SCSI_F_HOTPLUG) & 1) &&

        (s->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) {

        virtio_scsi_push_event(s, dev, VIRTIO_SCSI_T_TRANSPORT_RESET,

                               VIRTIO_SCSI_EVT_RESET_RESCAN);

    }

}


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

 {

+    const uint32_t broadcast_addr =

         ~slirp->vnetwork_mask.s_addr | slirp->vnetwork_addr.s_addr;

bool arp_table_search(Slirp *slirp, uint32_t ip_addr,

                      uint8_t out_ethaddr[ETH_ALEN])

{

    const uint32_t broadcast_addr =

        ~slirp->vnetwork_mask.s_addr | slirp->vnetwork_addr.s_addr;

    ArpTable *arptbl = &slirp->arp_table;

    int i;

    DEBUG_CALL("arp_table_search");

    DEBUG_ARG("ip = 0x%x", ip_addr);

    /* Check 0.0.0.0/8 invalid source-only addresses */

    assert((ip_addr & htonl(~(0xf << 28))) != 0);

    /* If broadcast address */

    if (ip_addr == 0xffffffff || ip_addr == broadcast_addr) {

        /* return Ethernet broadcast address */

        memset(out_ethaddr, 0xff, ETH_ALEN);

        return 1;

    }

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

        if (arptbl->table[i].ar_sip == ip_addr) {

            memcpy(out_ethaddr, arptbl->table[i].ar_sha,  ETH_ALEN);

            DEBUG_ARGS((dfd, " found hw addr = %02x:%02x:%02x:%02x:%02x:%02x\n",

                        out_ethaddr[0], out_ethaddr[1], out_ethaddr[2],

                        out_ethaddr[3], out_ethaddr[4], out_ethaddr[5]));

            return 1;

        }

    }

    return 0;

}


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

     idx = tcg_global_reg_new_internal(TCG_TYPE_I32, reg, name);
+
+    return MAKE_TCGV_I32(idx);
+
 }

TCGv_i32 tcg_global_reg_new_i32(int reg, const char *name)

{

    int idx;

    idx = tcg_global_reg_new_internal(TCG_TYPE_I32, reg, name);

    return MAKE_TCGV_I32(idx);

}


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

     AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
+
+

     DPRINTF(ad->port_no, "dma done\n");

static int ahci_dma_set_inactive(IDEDMA *dma)

{

    AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);

    DPRINTF(ad->port_no, "dma done\n");

    /* update d2h status */

    ahci_write_fis_d2h(ad, NULL);

    ad->dma_cb = NULL;

    /* maybe we still have something to process, check later */

    ad->check_bh = qemu_bh_new(ahci_check_cmd_bh, ad);

    qemu_bh_schedule(ad->check_bh);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 static void aarch64_cpu_set_pc(CPUState *cs, vaddr value)

+{

     ARMCPU *cpu = ARM_CPU(cs);

static void aarch64_cpu_set_pc(CPUState *cs, vaddr value)

{

    ARMCPU *cpu = ARM_CPU(cs);

    /*

     * TODO: this will need updating for system emulation,

     * when the core may be in AArch32 mode.

     */

    cpu->env.pc = value;

}


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

 {

+    uint8_t *compressed_data = NULL;
+
+    uint8_t *data = NULL;
+
+    gsize len;

     ssize_t bytes;

int load_image_gzipped(const char *filename, hwaddr addr, uint64_t max_sz)

{

    uint8_t *compressed_data = NULL;

    uint8_t *data = NULL;

    gsize len;

    ssize_t bytes;

    int ret = -1;

    if (!g_file_get_contents(filename, (char **) &compressed_data, &len,

                             NULL)) {

        goto out;

    }

    /* Is it a gzip-compressed file? */

    if (len < 2 ||

        compressed_data[0] != 0x1f ||

        compressed_data[1] != 0x8b) {

        goto out;

    }

    if (max_sz > LOAD_IMAGE_MAX_GUNZIP_BYTES) {

        max_sz = LOAD_IMAGE_MAX_GUNZIP_BYTES;

    }

    data = g_malloc(max_sz);

    bytes = gunzip(data, max_sz, compressed_data, len);

    if (bytes < 0) {

        fprintf(stderr, "%s: unable to decompress gzipped kernel file\n",

                filename);

        goto out;

    }

    rom_add_blob_fixed(filename, data, bytes, addr);

    ret = bytes;

 out:

    g_free(compressed_data);

    g_free(data);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 void qemu_vfree(void *ptr)
+
 {

     /* may be useful some day, but currently we do not need to free */

void qemu_vfree(void *ptr)

{

    /* may be useful some day, but currently we do not need to free */

}


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

+    if (qemu_input_is_absolute() || absolute_enabled) {
+
+        int scr_w, scr_h;
+
+        SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h);

         max_x = scr_w - 1;

static void handle_mousemotion(SDL_Event *ev)

{

    int max_x, max_y;

    struct sdl2_console *scon = get_scon_from_window(ev->key.windowID);

    if (qemu_input_is_absolute() || absolute_enabled) {

        int scr_w, scr_h;

        SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h);

        max_x = scr_w - 1;

        max_y = scr_h - 1;

        if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 ||

                         ev->motion.x == max_x || ev->motion.y == max_y)) {

            sdl_grab_end(scon);

        }

        if (!gui_grab &&

            (ev->motion.x > 0 && ev->motion.x < max_x &&

             ev->motion.y > 0 && ev->motion.y < max_y)) {

            sdl_grab_start(scon);

        }

    }

    if (gui_grab || qemu_input_is_absolute() || absolute_enabled) {

        sdl_send_mouse_event(scon, ev->motion.xrel, ev->motion.yrel,

                             ev->motion.x, ev->motion.y, ev->motion.state);

    }

}


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

+    str = "1kiB";
+
+    res = qemu_strtosz(str, &endptr);
+
+    g_assert_cmpint(res, ==, 1024);

     g_assert(endptr == str + 2);

static void test_qemu_strtosz_trailing(void)

{

    const char *str;

    char *endptr = NULL;

    int64_t res;

    str = "123xxx";

    res = qemu_strtosz_MiB(str, &endptr);

    g_assert_cmpint(res, ==, 123 * M_BYTE);

    g_assert(endptr == str + 3);

    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);

    str = "1kiB";

    res = qemu_strtosz(str, &endptr);

    g_assert_cmpint(res, ==, 1024);

    g_assert(endptr == str + 2);

    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);

}


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

     while ((vma = vma_first(mm)) != NULL) {

+        TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);
+
+        qemu_free(vma);
+
     }

     qemu_free(mm);

static void vma_delete(struct mm_struct *mm)

{

    struct vm_area_struct *vma;

    while ((vma = vma_first(mm)) != NULL) {

        TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);

        qemu_free(vma);

    }

    qemu_free(mm);

}


--- a/source.c
+++ b/source.c
@@ -5,5 +5,5 @@
     assert(src == sextract64(src, 0, 22));

     return tcg_opc_a5(qp, OPC_ADDL_A5, dst, src, TCG_REG_R0);
+
+}

static inline uint64_t tcg_opc_movi_a(int qp, TCGReg dst, int64_t src)

{

    assert(src == sextract64(src, 0, 22));

    return tcg_opc_a5(qp, OPC_ADDL_A5, dst, src, TCG_REG_R0);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static void gen_exception(DisasContext *s, int trapno, target_ulong cur_eip)

 {
+
+    gen_update_cc_op(s);
+
     gen_jmp_im(cur_eip);

     gen_helper_raise_exception(cpu_env, tcg_const_i32(trapno));

static void gen_exception(DisasContext *s, int trapno, target_ulong cur_eip)

{

    gen_update_cc_op(s);

    gen_jmp_im(cur_eip);

    gen_helper_raise_exception(cpu_env, tcg_const_i32(trapno));

    s->is_jmp = DISAS_TB_JUMP;

}


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

     if (!conf->bs) {
+
+        error_report("virtio-blk-pci: drive property not set");
+
+
+

VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf)

{

    VirtIOBlock *s;

    int cylinders, heads, secs;

    static int virtio_blk_id;

    DriveInfo *dinfo;

    if (!conf->bs) {

        error_report("virtio-blk-pci: drive property not set");

    s = (VirtIOBlock *)virtio_common_init("virtio-blk", VIRTIO_ID_BLOCK,

                                          sizeof(struct virtio_blk_config),

                                          sizeof(VirtIOBlock));

    s->vdev.get_config = virtio_blk_update_config;

    s->vdev.get_features = virtio_blk_get_features;

    s->vdev.reset = virtio_blk_reset;

    s->bs = conf->bs;

    s->conf = conf;

    s->rq = NULL;

    s->sector_mask = (s->conf->logical_block_size / BDRV_SECTOR_SIZE) - 1;

    bdrv_guess_geometry(s->bs, &cylinders, &heads, &secs);

    /* NB: per existing s/n string convention the string is terminated

     * by '\0' only when less than sizeof (s->sn)

     */

    dinfo = drive_get_by_blockdev(s->bs);

    strncpy(s->sn, dinfo->serial, sizeof (s->sn));

    s->vq = virtio_add_queue(&s->vdev, 128, virtio_blk_handle_output);

    qemu_add_vm_change_state_handler(virtio_blk_dma_restart_cb, s);

    register_savevm(dev, "virtio-blk", virtio_blk_id++, 2,

                    virtio_blk_save, virtio_blk_load, s);

    bdrv_set_removable(s->bs, 0);

    return &s->vdev;


--- a/source.c
+++ b/source.c
@@ -1,12 +1,12 @@
+static int read_mv_component(VP56RangeCoder *c, const uint8_t *p)

 {

     int bit, x = 0;

+

+    if (vp56_rac_get_prob_branchy(c, p[0])) {

         int i;

static int read_mv_component(VP56RangeCoder *c, const uint8_t *p)

{

    int bit, x = 0;

    if (vp56_rac_get_prob_branchy(c, p[0])) {

        int i;

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

            x += vp56_rac_get_prob(c, p[9 + i]) << i;

        for (i = 9; i > 3; i--)

            x += vp56_rac_get_prob(c, p[9 + i]) << i;

        if (!(x & 0xFFF0) || vp56_rac_get_prob(c, p[12]))

            x += 8;

    } else {

        // small_mvtree

        const uint8_t *ps = p + 2;

        bit = vp56_rac_get_prob(c, *ps);

        ps += 1 + 3 * bit;

        x  += 4 * bit;

        bit = vp56_rac_get_prob(c, *ps);

        ps += 1 + bit;

        x  += 2 * bit;

        x  += vp56_rac_get_prob(c, *ps);

    }

    return (x && vp56_rac_get_prob(c, p[1])) ? -x : x;

}


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

     gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);
+
 #else

     if (unlikely(ctx->pr)) {

static void gen_slbia(DisasContext *ctx)

{

#if defined(CONFIG_USER_ONLY)

    gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

#else

    if (unlikely(ctx->pr)) {

        gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC);

        return;

    }

    gen_helper_slbia(cpu_env);

#endif

}


--- a/source.c
+++ b/source.c
@@ -23,11 +23,11 @@
             continue;

         }
+
+
+
+        tswap32s(&req->req.tmf->type);
+
         if (req->req.tmf->type == VIRTIO_SCSI_T_TMF) {

             if (virtio_scsi_parse_req(req, sizeof(VirtIOSCSICtrlTMFReq),

static void virtio_scsi_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)

{

    VirtIOSCSI *s = (VirtIOSCSI *)vdev;

    VirtIOSCSIReq *req;

    while ((req = virtio_scsi_pop_req(s, vq))) {

        int type;

        if (iov_to_buf(req->elem.out_sg, req->elem.out_num, 0,

                       &type, sizeof(type)) < sizeof(type)) {

            virtio_scsi_bad_req();

            continue;

        }

        tswap32s(&req->req.tmf->type);

        if (req->req.tmf->type == VIRTIO_SCSI_T_TMF) {

            if (virtio_scsi_parse_req(req, sizeof(VirtIOSCSICtrlTMFReq),

                                      sizeof(VirtIOSCSICtrlTMFResp)) < 0) {

                virtio_scsi_bad_req();

            } else {

                virtio_scsi_do_tmf(s, req);

            }

        } else if (req->req.tmf->type == VIRTIO_SCSI_T_AN_QUERY ||

                   req->req.tmf->type == VIRTIO_SCSI_T_AN_SUBSCRIBE) {

            if (virtio_scsi_parse_req(req, sizeof(VirtIOSCSICtrlANReq),

                                      sizeof(VirtIOSCSICtrlANResp)) < 0) {

                virtio_scsi_bad_req();

            } else {

                req->resp.an->event_actual = 0;

                req->resp.an->response = VIRTIO_SCSI_S_OK;

            }

        }

        virtio_scsi_complete_req(req);

    }

}


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

     }

+
+
+    fft(mdct, x, mdct->nbits - 2);
+
+

     /* post rotation */

static void mdct512(AC3MDCTContext *mdct, int32_t *out, int16_t *in)

{

    int i, re, im, n, n2, n4;

    int16_t *rot = mdct->rot_tmp;

    IComplex *x  = mdct->cplx_tmp;

    n  = 1 << mdct->nbits;

    n2 = n >> 1;

    n4 = n >> 2;

    /* shift to simplify computations */

    for (i = 0; i <n4; i++)

        rot[i] = -in[i + 3*n4];

    memcpy(&rot[n4], &in[0], 3*n4*sizeof(*in));

    /* pre rotation */

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

        re =  ((int)rot[   2*i] - (int)rot[ n-1-2*i]) >> 1;

        im = -((int)rot[n2+2*i] - (int)rot[n2-1-2*i]) >> 1;

        CMUL(x[i].re, x[i].im, re, im, -mdct->xcos1[i], mdct->xsin1[i], 15);

    }

    fft(mdct, x, mdct->nbits - 2);

    /* post rotation */

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

        re = x[i].re;

        im = x[i].im;

        CMUL(out[n2-1-2*i], out[2*i], re, im, mdct->xsin1[i], mdct->xcos1[i], 0);

    }

}


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

 {

+	TCGv t0;
+
+	DIS(fprintf (logfile, "move $p%u, $r%u\n", dc->op1, dc->op2));
+
+	cris_cc_mask(dc, 0);

static unsigned int dec_move_pr(DisasContext *dc)

{

	TCGv t0;

	DIS(fprintf (logfile, "move $p%u, $r%u\n", dc->op1, dc->op2));

	cris_cc_mask(dc, 0);

	if (dc->op2 == PR_CCS)

		cris_evaluate_flags(dc);

	t0 = tcg_temp_new(TCG_TYPE_TL);

	t_gen_mov_TN_preg(t0, dc->op2);

	cris_alu(dc, CC_OP_MOVE,

		 cpu_R[dc->op1], cpu_R[dc->op1], t0, preg_sizes[dc->op2]);

	tcg_temp_free(t0);

	return 2;

}


void show_help(void)

{

    const OptionDef *po;

    int i, expert;

    printf("ffmpeg version " FFMPEG_VERSION ", Copyright (c) 2000,2001 Gerard Lantau\n"

           "usage: ffmpeg [[options] -i input_file]... {[options] outfile}...\n"

           "Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder\n"

           "\n"

           "Main options are:\n");

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

        if (i == 1)

            printf("\nAdvanced options are:\n");

        for(po = options; po->name != NULL; po++) {

            char buf[64];

            expert = (po->flags & OPT_EXPERT) != 0;

            if (expert == i) {

                strcpy(buf, po->name);

                if (po->flags & HAS_ARG) {

                    strcat(buf, " ");

                    strcat(buf, po->argname);

                }

                printf("-%-17s  %s\n", buf, po->help);

            }

        }

    }

    exit(1);

}


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

+    case 0x08:	/* DSP_IDLECT2 */
+
+        s->clkm.dsp_idlect2 = value & 0x0037;
+
+        diff = s->clkm.dsp_idlect1 ^ value;

         omap_clkdsp_idlect2_update(s, diff, value);

static void omap_clkdsp_write(void *opaque, target_phys_addr_t addr,

                              uint64_t value, unsigned size)

{

    struct omap_mpu_state_s *s = (struct omap_mpu_state_s *) opaque;

    uint16_t diff;

    if (size != 2) {

        return omap_badwidth_write16(opaque, addr, value);

    }

    switch (addr) {

    case 0x04:	/* DSP_IDLECT1 */

        diff = s->clkm.dsp_idlect1 ^ value;

        s->clkm.dsp_idlect1 = value & 0x01f7;

        omap_clkdsp_idlect1_update(s, diff, value);

        break;

    case 0x08:	/* DSP_IDLECT2 */

        s->clkm.dsp_idlect2 = value & 0x0037;

        diff = s->clkm.dsp_idlect1 ^ value;

        omap_clkdsp_idlect2_update(s, diff, value);

        break;

    case 0x14:	/* DSP_RSTCT2 */

        s->clkm.dsp_rstct2 = value & 0x0001;

        break;

    case 0x18:	/* DSP_SYSST */

        s->clkm.cold_start &= value & 0x3f;

        break;

    default:

        OMAP_BAD_REG(addr);

    }

}


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

         case FLV_CODECID_VP6A  :

+            if (!flv->alpha_stream) {
+
+                AVCodecContext *alpha_codec;
+
+                flv->alpha_stream = av_new_stream(s, 2);

                 if (flv->alpha_stream) {

static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {

    FLVContext *flv = s->priv_data;

    AVCodecContext *vcodec = vstream->codec;

    switch(flv_codecid) {

        case FLV_CODECID_H263  : vcodec->codec_id = CODEC_ID_FLV1   ; break;

        case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FLASHSV; break;

        case FLV_CODECID_VP6A  :

            if (!flv->alpha_stream) {

                AVCodecContext *alpha_codec;

                flv->alpha_stream = av_new_stream(s, 2);

                if (flv->alpha_stream) {

                    av_set_pts_info(flv->alpha_stream, 24, 1, 1000);

                    alpha_codec = flv->alpha_stream->codec;

                    alpha_codec->codec_type = CODEC_TYPE_VIDEO;

                    alpha_codec->codec_id = CODEC_ID_VP6F;

                    alpha_codec->extradata_size = 1;

                    alpha_codec->extradata = av_malloc(1);

                }

            }

        case FLV_CODECID_VP6   : vcodec->codec_id = CODEC_ID_VP6F   ;

            if(vcodec->extradata_size != 1) {

                vcodec->extradata_size = 1;

                vcodec->extradata = av_malloc(1);

            }

            vcodec->extradata[0] = get_byte(&s->pb);

            if (flv->alpha_stream)

                flv->alpha_stream->codec->extradata[0] = vcodec->extradata[0];

            return 1; // 1 byte body size adjustment for flv_read_packet()

        default:

            av_log(s, AV_LOG_INFO, "Unsupported video codec (%x)\n", flv_codecid);

            vcodec->codec_tag = flv_codecid;

    }

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -3,11 +3,11 @@
     int *bounding_values)

 {
+
+    unsigned char *end;
+
+    int filter_value;
+

     for (end= first_pixel + 8*stride; first_pixel < end; first_pixel += stride) {

static void horizontal_filter(unsigned char *first_pixel, int stride,

    int *bounding_values)

{

    unsigned char *end;

    int filter_value;

    for (end= first_pixel + 8*stride; first_pixel < end; first_pixel += stride) {

        filter_value =

            (first_pixel[-2] - first_pixel[ 1])

         +3*(first_pixel[ 0] - first_pixel[-1]);

        filter_value = bounding_values[(filter_value + 4) >> 3];

        first_pixel[-1] = clip_uint8(first_pixel[-1] + filter_value);

        first_pixel[ 0] = clip_uint8(first_pixel[ 0] - filter_value);

    }

}


static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size)

{

    int shift  = 15 - BIT_DEPTH - log2_size;

    int x, y;

    int size = 1 << log2_size;

    if (shift > 0) {

        int offset = 1 << (shift - 1);

        for (y = 0; y < size; y++) {

            for (x = 0; x < size; x++) {

                *coeffs = (*coeffs + offset) >> shift;

                coeffs++;

            }

        }

    } else {

        for (y = 0; y < size; y++) {

            for (x = 0; x < size; x++) {

                *coeffs = *coeffs << -shift;

                coeffs++;

            }

        }

    }

}


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

     }
+
+
+
+    action = common->action->u.block_dirty_bitmap_add;
+
     /* AIO context taken and released within qmp_block_dirty_bitmap_add */

     qmp_block_dirty_bitmap_add(action->node, action->name,

static void block_dirty_bitmap_add_prepare(BlkActionState *common,

                                           Error **errp)

{

    Error *local_err = NULL;

    BlockDirtyBitmapAdd *action;

    BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,

                                             common, common);

    if (action_check_completion_mode(common, errp) < 0) {

        return;

    }

    action = common->action->u.block_dirty_bitmap_add;

    /* AIO context taken and released within qmp_block_dirty_bitmap_add */

    qmp_block_dirty_bitmap_add(action->node, action->name,

                               action->has_granularity, action->granularity,

                               &local_err);

    if (!local_err) {

        state->prepared = true;

    } else {

        error_propagate(errp, local_err);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+static inline int64_t add64(const int64_t a, const int64_t b)

 {

static inline int64_t add64(const int64_t a, const int64_t b)

{

	return a + b;

}


--- a/source.c
+++ b/source.c
@@ -13,11 +13,11 @@
     case USB_TOKEN_OUT:

         switch (p->devep) {
+
+        case 1:
+
+            ret = usb_audio_handle_dataout(s, p);
+
             break;

         default:

static int usb_audio_handle_data(USBDevice *dev, USBPacket *p)

{

    USBAudioState *s = (USBAudioState *) dev;

    int ret = 0;

    switch (p->pid) {

    case USB_TOKEN_OUT:

        switch (p->devep) {

        case 1:

            ret = usb_audio_handle_dataout(s, p);

            break;

        default:

            goto fail;

        }

        break;

    default:

fail:

        ret = USB_RET_STALL;

        break;

    }

    if (ret == USB_RET_STALL && s->debug) {

        fprintf(stderr, "usb-audio: failed data transaction: "

                        "pid 0x%x ep 0x%x len 0x%zx\n",

                        p->pid, p->devep, p->iov.size);

    }

    return ret;

}


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

 {

+    struct iovec *sg = get_sg(pdu, rx);
+
+    size_t offset = *offsetp;
+
+    unsigned int count;

     int32_t size;

static void pprint_data(V9fsPDU *pdu, int rx, size_t *offsetp, const char *name)

{

    struct iovec *sg = get_sg(pdu, rx);

    size_t offset = *offsetp;

    unsigned int count;

    int32_t size;

    int total, i, j;

    ssize_t len;

    if (rx) {

        count = pdu->elem.in_num;

    } else

        count = pdu->elem.out_num;

    }


--- a/source.c
+++ b/source.c
@@ -1,6 +1,6 @@
 e1000e_write_ext_rx_descr(E1000ECore *core, uint8_t *desc,

+                          struct NetRxPkt *pkt,

                           const E1000E_RSSInfo *rss_info,

e1000e_write_ext_rx_descr(E1000ECore *core, uint8_t *desc,

                          struct NetRxPkt *pkt,

                          const E1000E_RSSInfo *rss_info,

                          uint16_t length)

{

    union e1000_rx_desc_extended *d = (union e1000_rx_desc_extended *) desc;

    memset(d, 0, sizeof(*d));

    d->wb.upper.length = cpu_to_le16(length);

    e1000e_build_rx_metadata(core, pkt, pkt != NULL,

                             rss_info,

                             &d->wb.lower.hi_dword.rss,

                             &d->wb.lower.mrq,

                             &d->wb.upper.status_error,

                             &d->wb.lower.hi_dword.csum_ip.ip_id,

                             &d->wb.upper.vlan);

}


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

 //         av_log(NULL, AV_LOG_DEBUG, "Checking: %s\n", d->name);

+        av_assert0(d->log2_chroma_w <= 3);

         av_assert0(d->log2_chroma_h <= 3);

void ff_check_pixfmt_descriptors(void){

    int i, j;

    for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) {

        const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[i];

        uint8_t fill[4][8+6+3] = {{0}};

        uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};

        int linesize[4] = {0,0,0,0};

        uint16_t tmp[2];

        if (!d->name && !d->nb_components && !d->log2_chroma_w && !d->log2_chroma_h && !d->flags)

            continue;

//         av_log(NULL, AV_LOG_DEBUG, "Checking: %s\n", d->name);

        av_assert0(d->log2_chroma_w <= 3);

        av_assert0(d->log2_chroma_h <= 3);

        av_assert0(d->nb_components <= 4);

        av_assert0(d->name && d->name[0]);

        av_assert0((d->nb_components==4 || d->nb_components==2) == !!(d->flags & AV_PIX_FMT_FLAG_ALPHA));

        av_assert2(av_get_pix_fmt(d->name) == i);

        for (j=0; j<FF_ARRAY_ELEMS(d->comp); j++) {

            const AVComponentDescriptor *c = &d->comp[j];

            if(j>=d->nb_components) {

                av_assert0(!c->plane && !c->step_minus1 && !c->offset_plus1 && !c->shift && !c->depth_minus1);

                continue;

            }

            if (d->flags & AV_PIX_FMT_FLAG_BITSTREAM) {

                av_assert0(c->step_minus1 >= c->depth_minus1);

            } else {

                av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1);

            }

            av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);

            if (!strncmp(d->name, "bayer_", 6))

                continue;

            av_assert0(tmp[0] == 0 && tmp[1] == 0);

            tmp[0] = tmp[1] = (1<<(c->depth_minus1 + 1)) - 1;

            av_write_image_line(tmp, data, linesize, d, 0, 0, j, 2);

        }

    }

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
 static void init_excp_602 (CPUPPCState *env)
+
 {

 #if !defined(CONFIG_USER_ONLY)
@@ -18,9 +18,9 @@

     env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;

+    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;

+    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;

     env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;

static void init_excp_602 (CPUPPCState *env)

{

#if !defined(CONFIG_USER_ONLY)

    env->excp_vectors[POWERPC_EXCP_RESET]    = 0x00000100;

    env->excp_vectors[POWERPC_EXCP_MCHECK]   = 0x00000200;

    env->excp_vectors[POWERPC_EXCP_DSI]      = 0x00000300;

    env->excp_vectors[POWERPC_EXCP_ISI]      = 0x00000400;

    env->excp_vectors[POWERPC_EXCP_EXTERNAL] = 0x00000500;

    env->excp_vectors[POWERPC_EXCP_ALIGN]    = 0x00000600;

    env->excp_vectors[POWERPC_EXCP_PROGRAM]  = 0x00000700;

    env->excp_vectors[POWERPC_EXCP_FPU]      = 0x00000800;

    env->excp_vectors[POWERPC_EXCP_DECR]     = 0x00000900;

    env->excp_vectors[POWERPC_EXCP_SYSCALL]  = 0x00000C00;

    env->excp_vectors[POWERPC_EXCP_TRACE]    = 0x00000D00;

    env->excp_vectors[POWERPC_EXCP_FPA]      = 0x00000E00;

    env->excp_vectors[POWERPC_EXCP_IFTLB]    = 0x00001000;

    env->excp_vectors[POWERPC_EXCP_DLTLB]    = 0x00001100;

    env->excp_vectors[POWERPC_EXCP_DSTLB]    = 0x00001200;

    env->excp_vectors[POWERPC_EXCP_IABR]     = 0x00001300;

    env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;

    env->excp_vectors[POWERPC_EXCP_WDT]      = 0x00001500;

    env->excp_vectors[POWERPC_EXCP_EMUL]     = 0x00001600;

    env->excp_prefix = 0xFFF00000;

    /* Hardware reset vector */

    env->hreset_vector = 0xFFFFFFFCUL;

#endif

}


--- a/source.c
+++ b/source.c
@@ -1,13 +1,13 @@
+static void scsi_cancel_io(SCSIDevice *d, uint32_t tag)
+
+{
+
+    DPRINTF("scsi_cancel_io 0x%x\n", tag);
+
+    SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, d);
+
+    SCSIGenericReq *r;
+
     DPRINTF("Cancel tag=0x%x\n", tag);

     r = scsi_find_request(s, tag);

static void scsi_cancel_io(SCSIDevice *d, uint32_t tag)

{

    DPRINTF("scsi_cancel_io 0x%x\n", tag);

    SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, d);

    SCSIGenericReq *r;

    DPRINTF("Cancel tag=0x%x\n", tag);

    r = scsi_find_request(s, tag);

    if (r) {

        if (r->req.aiocb)

            bdrv_aio_cancel(r->req.aiocb);

        r->req.aiocb = NULL;

        scsi_req_dequeue(&r->req);

    }

}


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

+    frame_bits = process_exponents(s, mdct_coef, exp_shift, exp, exp_strategy,
+
+                                   encoded_exp, num_exp_groups, grouped_exp);
+
+

     compute_bit_allocation(s, bap, encoded_exp, exp_strategy, frame_bits);

static int ac3_encode_frame(AVCodecContext *avctx,

                            unsigned char *frame, int buf_size, void *data)

{

    AC3EncodeContext *s = avctx->priv_data;

    const int16_t *samples = data;

    int16_t planar_samples[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE+AC3_FRAME_SIZE];

    int32_t mdct_coef[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_COEFS];

    uint8_t exp[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_COEFS];

    uint8_t exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS];

    uint8_t encoded_exp[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_COEFS];

    uint8_t num_exp_groups[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS];

    uint8_t grouped_exp[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_EXP_GROUPS];

    uint8_t bap[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_COEFS];

    int8_t exp_shift[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS];

    uint16_t qmant[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS][AC3_MAX_COEFS];

    int frame_bits;

    if (s->bit_alloc.sr_code == 1)

        adjust_frame_size(s);

    deinterleave_input_samples(s, samples, planar_samples);

    apply_mdct(s, planar_samples, exp_shift, mdct_coef);

    frame_bits = process_exponents(s, mdct_coef, exp_shift, exp, exp_strategy,

                                   encoded_exp, num_exp_groups, grouped_exp);

    compute_bit_allocation(s, bap, encoded_exp, exp_strategy, frame_bits);

    quantize_mantissas(s, mdct_coef, exp_shift, encoded_exp, bap, qmant);

    output_frame(s, frame, exp_strategy, num_exp_groups, grouped_exp, bap, qmant);

    return s->frame_size;

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
+static av_always_inline void paint_raw(uint8_t *dst, int w, int h,

                                        const uint8_t *src, int bpp,

+                                       int be, int stride)
+
 {

     int i, j, p;

static av_always_inline void paint_raw(uint8_t *dst, int w, int h,

                                       const uint8_t *src, int bpp,

                                       int be, int stride)

{

    int i, j, p;

    for (j = 0; j < h; j++) {

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

            p = vmnc_get_pixel(src, bpp, be);

            src += bpp;

            switch (bpp) {

            case 1:

                dst[i] = p;

                break;

            case 2:

                ((uint16_t*)dst)[i] = p;

                break;

            case 4:

                ((uint32_t*)dst)[i] = p;

                break;

            }

        }

        dst += stride;

    }

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 static void ide_dma_restart_cb(void *opaque, int running, int reason)

 {
+
+    BMDMAState *bm = opaque;
+
+    if (!running)
+
         return;

     if (bm->status & BM_STATUS_DMA_RETRY) {

static void ide_dma_restart_cb(void *opaque, int running, int reason)

{

    BMDMAState *bm = opaque;

    if (!running)

        return;

    if (bm->status & BM_STATUS_DMA_RETRY) {

        bm->status &= ~BM_STATUS_DMA_RETRY;

        ide_dma_restart(bm->ide_if);

    } else if (bm->status & BM_STATUS_PIO_RETRY) {

        bm->status &= ~BM_STATUS_PIO_RETRY;

        ide_sector_write(bm->ide_if);

    }

}


void qemu_free(void *ptr)

{

    free(ptr);

}


--- a/source.c
+++ b/source.c
@@ -3,11 +3,11 @@
     const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);

     const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;
+
+    const int alpha = alpha_table[index_a];
+
+    const int beta  = beta_table[qp - qp_bd_offset + h->slice_beta_offset];
+
     if (alpha ==0 || beta == 0) return;

static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, const int16_t bS[4], unsigned int qp, H264Context *h ) {

    const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);

    const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;

    const int alpha = alpha_table[index_a];

    const int beta  = beta_table[qp - qp_bd_offset + h->slice_beta_offset];

    if (alpha ==0 || beta == 0) return;

    if( bS[0] < 4 ) {

        int8_t tc[4];

        tc[0] = tc0_table[index_a][bS[0]]+1;

        tc[1] = tc0_table[index_a][bS[1]]+1;

        tc[2] = tc0_table[index_a][bS[2]]+1;

        tc[3] = tc0_table[index_a][bS[3]]+1;

        h->h264dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);

    } else {

        h->h264dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);

    }

}


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
+static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,

+             int srcSliceH, uint8_t* dst[], int dstStride[]){
+
     if(c->srcFormat == PIX_FMT_YUV422P){

+	srcStride[1] *= 2;

 	srcStride[2] *= 2;

static int mlib_YUV2ABGR420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,

             int srcSliceH, uint8_t* dst[], int dstStride[]){

    if(c->srcFormat == PIX_FMT_YUV422P){

	srcStride[1] *= 2;

	srcStride[2] *= 2;

    }

    assert(srcStride[1] == srcStride[2]);

    mlib_VideoColorYUV2ABGR420(dst[0]+srcSliceY*dstStride[0], src[0], src[1], src[2], c->dstW,

			     srcSliceH, dstStride[0], srcStride[0], srcStride[1]);

    return srcSliceH;

}


av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx)

{

    const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;

    c->diff_pixels = diff_pixels_c;

    switch (avctx->bits_per_raw_sample) {

    case 9:

    case 10:

    case 12:

    case 14:

        c->get_pixels = get_pixels_16_c;

        break;

    default:

        if (avctx->bits_per_raw_sample<=8 || avctx->codec_type != AVMEDIA_TYPE_VIDEO) {

            c->get_pixels = get_pixels_8_c;

        }

        break;

    }

    if (ARCH_ALPHA)

        ff_pixblockdsp_init_alpha(c, avctx, high_bit_depth);

    if (ARCH_ARM)

        ff_pixblockdsp_init_arm(c, avctx, high_bit_depth);

    if (ARCH_PPC)

        ff_pixblockdsp_init_ppc(c, avctx, high_bit_depth);

    if (ARCH_X86)

        ff_pixblockdsp_init_x86(c, avctx, high_bit_depth);

    if (ARCH_MIPS)

        ff_pixblockdsp_init_mips(c, avctx, high_bit_depth);

}


--- a/source.c
+++ b/source.c
@@ -27,11 +27,11 @@
     info = (VIOsPAPRDeviceInfo *)qdev_get_info(&dev->qdev);

+
+    if (mode & ~info->signal_mask) {
+
+        return H_PARAMETER;
+
     }

static target_ulong h_vio_signal(CPUState *env, sPAPREnvironment *spapr,

                                 target_ulong opcode,

                                 target_ulong *args)

{

    target_ulong reg = args[0];

    target_ulong mode = args[1];

    VIOsPAPRDevice *dev = spapr_vio_find_by_reg(spapr->vio_bus, reg);

    VIOsPAPRDeviceInfo *info;

    if (!dev) {

        return H_PARAMETER;

    }

    info = (VIOsPAPRDeviceInfo *)qdev_get_info(&dev->qdev);

    if (mode & ~info->signal_mask) {

        return H_PARAMETER;

    }

    dev->signal_state = mode;

    return H_SUCCESS;

}


--- a/source.c
+++ b/source.c
@@ -1,7 +1,7 @@
 static inline int IRQ_testbit(IRQQueue *q, int n_IRQ)

 {
+
     return test_bit(q->queue, n_IRQ);

 }

static inline int IRQ_testbit(IRQQueue *q, int n_IRQ)

{

    return test_bit(q->queue, n_IRQ);

}


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

     const uint8_t *const buf_start = buf;
+
+    unsigned x;

     for (x = 0; x < dst_size && buf < buf_end;) {
+
+        unsigned length;

         const int8_t value = *buf++;

static int decode_byterun(uint8_t *dst, int dst_size,

                          const uint8_t *buf, const uint8_t *const buf_end)

{

    const uint8_t *const buf_start = buf;

    unsigned x;

    for (x = 0; x < dst_size && buf < buf_end;) {

        unsigned length;

        const int8_t value = *buf++;

        if (value >= 0) {

            length = value + 1;

            memcpy(dst + x, buf, FFMIN3(length, dst_size - x, buf_end - buf));

            buf += length;

        } else if (value > -128) {

            length = -value + 1;

            memset(dst + x, *buf++, FFMIN(length, dst_size - x));

        } else { // noop

            continue;

        }

        x += length;

    }

    if (x < dst_size) {

        av_log(NULL, AV_LOG_WARNING, "decode_byterun ended before plane size\n");

        memset(dst+x, 0, dst_size - x);

    }

    return buf - buf_start;

}


--- a/source.c
+++ b/source.c
@@ -1,20 +1,20 @@
 static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile,

                     unsigned *nb_files_alloc)
+
 {

     ConcatContext *cat = avf->priv_data;
+
     ConcatFile *file;

+    char *url;

+    size_t url_len;

+    if (cat->safe > 0 && !safe_filename(filename)) {

         av_log(avf, AV_LOG_ERROR, "Unsafe file name '%s'\n", filename);

static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile,

                    unsigned *nb_files_alloc)

{

    ConcatContext *cat = avf->priv_data;

    ConcatFile *file;

    char *url;

    size_t url_len;

    if (cat->safe > 0 && !safe_filename(filename)) {

        av_log(avf, AV_LOG_ERROR, "Unsafe file name '%s'\n", filename);

        return AVERROR(EPERM);

    }

    url_len = strlen(avf->filename) + strlen(filename) + 16;

    if (!(url = av_malloc(url_len)))

        return AVERROR(ENOMEM);

    ff_make_absolute_url(url, url_len, avf->filename, filename);

    av_free(filename);

    if (cat->nb_files >= *nb_files_alloc) {

        size_t n = FFMAX(*nb_files_alloc * 2, 16);

        ConcatFile *new_files;

        if (n <= cat->nb_files || n > SIZE_MAX / sizeof(*cat->files) ||

            !(new_files = av_realloc(cat->files, n * sizeof(*cat->files))))

            return AVERROR(ENOMEM);

        cat->files = new_files;

        *nb_files_alloc = n;

    }

    file = &cat->files[cat->nb_files++];

    memset(file, 0, sizeof(*file));

    *rfile = file;

    file->url        = url;

    file->start_time = AV_NOPTS_VALUE;

    file->duration   = AV_NOPTS_VALUE;

    return 0;

}


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

+
+    if (s->staging_texture)
+
+        ID3D11Texture2D_Release(s->staging_texture);
+

 }

static void d3d11va_frames_uninit(AVHWFramesContext *ctx)

{

    AVD3D11VAFramesContext *frames_hwctx = ctx->hwctx;

    D3D11VAFramesContext *s = ctx->internal->priv;

    if (frames_hwctx->texture)

        ID3D11Texture2D_Release(frames_hwctx->texture);

    if (s->staging_texture)

        ID3D11Texture2D_Release(s->staging_texture);

}


--- a/source.c
+++ b/source.c
@@ -9,21 +9,21 @@
     char empty[32768];

     char* bu =(char*)(((long)empty + 32) & ~0xf);
+
+
+
+    int sum = 0;
+
+
+
+    while (pix->name)

+    {
+
+	int i;
+
+        uint64_t te, ts;
+
         op_pixels_func func = pix->func;

 	char* im = bu;

static test_speed(int step)

{

    const struct pix_func* pix = pix_func;

    const int linesize = 720;

    char empty[32768];

    char* bu =(char*)(((long)empty + 32) & ~0xf);

    int sum = 0;

    while (pix->name)

    {

	int i;

        uint64_t te, ts;

        op_pixels_func func = pix->func;

	char* im = bu;

	if (!(pix->mm_flags & mm_flags))

            continue;

	printf("%30s... ", pix->name);

        fflush(stdout);

	ts = rdtsc();

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

	    func(im, im + 1000, linesize, 16);

	    im += step;

	    if (im > bu + 20000)

		im = bu;

	}

	te = rdtsc();

        emms();

	printf("% 9d\n", (int)(te - ts));

        sum += (te - ts) / 100000;

	if (pix->mm_flags & PAD)

            puts("");

        pix++;

    }

    printf("Total sum: %d\n", sum);

}


--- a/source.c
+++ b/source.c
@@ -21,11 +21,11 @@
         for (j = 0; j < avctx->width; j++) {
             val = AV_RL32(src);
             u[j] = (val >>  2) & 0x3FF;
+            y[j] = (val >> 12) & 0x3FF;
+            v[j] = (val >> 22);
+            src += 4;
+        y += pic->linesize[0] >> 1;
+        u += pic->linesize[1] >> 1;
         v += pic->linesize[2] >> 1;
     *data_size = sizeof(AVFrame);
     *(AVFrame *)data = *pic;

static int v410_decode_frame(AVCodecContext *avctx, void *data,
                             int *data_size, AVPacket *avpkt)
{
    AVFrame *pic = avctx->coded_frame;
    uint8_t *src = avpkt->data;
    uint16_t *y, *u, *v;
    uint32_t val;
    int i, j;
    if (pic->data[0])
        avctx->release_buffer(avctx, pic);
    pic->reference = 0;
    if (avctx->get_buffer(avctx, pic) < 0) {
        av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
        return AVERROR(ENOMEM);
    pic->key_frame = 1;
    pic->pict_type = FF_I_TYPE;
    y = (uint16_t *)pic->data[0];
    u = (uint16_t *)pic->data[1];
    v = (uint16_t *)pic->data[2];
    for (i = 0; i < avctx->height; i++) {
        for (j = 0; j < avctx->width; j++) {
            val = AV_RL32(src);
            u[j] = (val >>  2) & 0x3FF;
            y[j] = (val >> 12) & 0x3FF;
            v[j] = (val >> 22);
            src += 4;
        y += pic->linesize[0] >> 1;
        u += pic->linesize[1] >> 1;
        v += pic->linesize[2] >> 1;
    *data_size = sizeof(AVFrame);
    *(AVFrame *)data = *pic;
    return avpkt->size;


--- a/source.c
+++ b/source.c
@@ -1,10 +1,10 @@
+uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2)
+
+{
+
+    uint64_t tmp = op1;

+    op1 = (uint32_t)(op1 + op2);

     if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {

uint64_t helper_addlv(CPUAlphaState *env, uint64_t op1, uint64_t op2)

{

    uint64_t tmp = op1;

    op1 = (uint32_t)(op1 + op2);

    if (unlikely((tmp ^ op2 ^ (-1UL)) & (tmp ^ op1) & (1UL << 31))) {

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

    }

    return op1;

}


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

     int x, y, plane;
+
     int score = 0;

     int64_t score64 = 0;

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

         const int stride = p->f.linesize[plane];

static int skip_check(MpegEncContext *s, Picture *p, Picture *ref)

{

    int x, y, plane;

    int score = 0;

    int64_t score64 = 0;

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

        const int stride = p->f.linesize[plane];

        const int bw = plane ? 1 : 2;

        for (y = 0; y < s->mb_height * bw; y++) {

            for (x = 0; x < s->mb_width * bw; x++) {

                int off = p->shared ? 0 : 16;

                uint8_t *dptr = p->f.data[plane] + 8 * (x + y * stride) + off;

                uint8_t *rptr = ref->f.data[plane] + 8 * (x + y * stride);

                int v   = s->dsp.frame_skip_cmp[1](s, dptr, rptr, stride, 8);

                switch (s->avctx->frame_skip_exp) {

                case 0: score    =  FFMAX(score, v);          break;

                case 1: score   += FFABS(v);                  break;

                case 2: score   += v * v;                     break;

                case 3: score64 += FFABS(v * v * (int64_t)v); break;

                case 4: score64 += v * v * (int64_t)(v * v);  break;

                }

            }

        }

    }

    if (score)

        score64 = score;

    if (score64 < s->avctx->frame_skip_threshold)

        return 1;

    if (score64 < ((s->avctx->frame_skip_factor * (int64_t)s->lambda) >> 8))

        return 1;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,4 +1,4 @@
+int qemu_reset_requested_get(void)

 {

int qemu_reset_requested_get(void)

{

    return reset_requested;

}


--- a/source.c
+++ b/source.c
@@ -1,16 +1,16 @@
+static char *qio_channel_websock_handshake_entry(const char *handshake,
+
+                                                 size_t handshake_len,
+
+                                                 const char *name)
+
+{
+
+    char *begin, *end, *ret = NULL;

     char *line = g_strdup_printf("%s%s: ",
+
+                                 QIO_CHANNEL_WEBSOCK_HANDSHAKE_DELIM,

                                  name);

static char *qio_channel_websock_handshake_entry(const char *handshake,

                                                 size_t handshake_len,

                                                 const char *name)

{

    char *begin, *end, *ret = NULL;

    char *line = g_strdup_printf("%s%s: ",

                                 QIO_CHANNEL_WEBSOCK_HANDSHAKE_DELIM,

                                 name);

    begin = g_strstr_len(handshake, handshake_len, line);

    if (begin != NULL) {

        begin += strlen(line);

        end = g_strstr_len(begin, handshake_len - (begin - handshake),

                QIO_CHANNEL_WEBSOCK_HANDSHAKE_DELIM);

        if (end != NULL) {

            ret = g_strndup(begin, end - begin);

        }

    }

    g_free(line);

    return ret;

}


--- a/source.c
+++ b/source.c
@@ -1,11 +1,11 @@
 int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode)

 {
+
+    CeltPVQ *s = av_malloc(sizeof(CeltPVQ));
+
+    if (!s)
+
         return AVERROR(ENOMEM);

int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode)

{

    CeltPVQ *s = av_malloc(sizeof(CeltPVQ));

    if (!s)

        return AVERROR(ENOMEM);

    s->pvq_search = ppp_pvq_search_c;

    s->quant_band = encode ? pvq_encode_band : pvq_decode_band;

    s->band_cost  = pvq_band_cost;

    if (ARCH_X86)

        ff_opus_dsp_init_x86(s);

    *pvq = s;

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -29,11 +29,11 @@
     /* align memory type resource size */

     r_size = xen_pt_get_emul_size(base->bar_flag, r_size);
+
+
+
+    /* set emulate mask and read-only mask */
+
     bar_ro_mask = (reg->ro_mask | (r_size - 1)) & ~PCI_ROM_ADDRESS_ENABLE;

static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,

                                        XenPTReg *cfg_entry, uint32_t *val,

                                        uint32_t dev_value, uint32_t valid_mask)

{

    XenPTRegInfo *reg = cfg_entry->reg;

    XenPTRegion *base = NULL;

    PCIDevice *d = (PCIDevice *)&s->dev;

    uint32_t writable_mask = 0;

    uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);

    pcibus_t r_size = 0;

    uint32_t bar_ro_mask = 0;

    r_size = d->io_regions[PCI_ROM_SLOT].size;

    base = &s->bases[PCI_ROM_SLOT];

    /* align memory type resource size */

    r_size = xen_pt_get_emul_size(base->bar_flag, r_size);

    /* set emulate mask and read-only mask */

    bar_ro_mask = (reg->ro_mask | (r_size - 1)) & ~PCI_ROM_ADDRESS_ENABLE;

    /* modify emulate register */

    writable_mask = ~bar_ro_mask & valid_mask;

    cfg_entry->data = XEN_PT_MERGE_VALUE(*val, cfg_entry->data, writable_mask);

    /* create value for writing to I/O device register */

    *val = XEN_PT_MERGE_VALUE(*val, dev_value, throughable_mask);

    return 0;

}


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

 {

+    ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci);
+
+

     ich9_pm_init(lpc_pci, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));

void ich9_lpc_pm_init(PCIDevice *lpc_pci)

{

    ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci);

    ich9_pm_init(lpc_pci, &lpc->pm, qemu_allocate_irq(ich9_set_sci, lpc, 0));

    ich9_lpc_reset(&lpc->d.qdev);

}


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

     char *buffer = NULL;
+
+    av_dict_copy(&dict, m, 0);
+
+    print_dict(dict);
+
     av_dict_get_string(dict, &buffer, val, pair);

     printf("%s\n", buffer);

static void test_separators(const AVDictionary *m, const char pair, const char val)

{

    AVDictionary *dict = NULL;

    char pairs[] = {pair , '\0'};

    char vals[]  = {val, '\0'};

    char *buffer = NULL;

    av_dict_copy(&dict, m, 0);

    print_dict(dict);

    av_dict_get_string(dict, &buffer, val, pair);

    printf("%s\n", buffer);

    av_dict_free(&dict);

    av_dict_parse_string(&dict, buffer, vals, pairs, 0);

    av_freep(&buffer);

    print_dict(dict);

    av_dict_free(&dict);

}


--- a/source.c
+++ b/source.c
@@ -5,7 +5,7 @@
     const char *driver;

     DeviceState *dev;
+

     driver = bdrv_is_sg(dinfo->bdrv) ? "scsi-generic" : "scsi-disk";

SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, DriveInfo *dinfo, int unit)

{

    const char *driver;

    DeviceState *dev;

    driver = bdrv_is_sg(dinfo->bdrv) ? "scsi-generic" : "scsi-disk";

    dev = qdev_create(&bus->qbus, driver);

    qdev_prop_set_uint32(dev, "scsi-id", unit);

    qdev_prop_set_drive(dev, "drive", dinfo);

    qdev_init(dev);

    return DO_UPCAST(SCSIDevice, qdev, dev);

}


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

     default:

+        /* Nothing is stored, but protection is checked and the
+
+           cacheline is marked dirty.  */
+
+#ifndef CONFIG_USER_ONLY

         probe_write(env, addr, cpu_mmu_index(env, 0), ra);

void HELPER(stby_e)(CPUHPPAState *env, target_ulong addr, target_ulong val)

{

    uintptr_t ra = GETPC();

    switch (addr & 3) {

    case 3:

        /* The 3 byte store must appear atomic.  */

        if (parallel_cpus) {

            atomic_store_3(env, addr - 3, val, 0xffffff00u, ra);

        } else {

            cpu_stw_data_ra(env, addr - 3, val >> 16, ra);

            cpu_stb_data_ra(env, addr - 1, val >> 8, ra);

        }

        break;

    case 2:

        cpu_stw_data_ra(env, addr - 2, val >> 16, ra);

        break;

    case 1:

        cpu_stb_data_ra(env, addr - 1, val >> 24, ra);

        break;

    default:

        /* Nothing is stored, but protection is checked and the

           cacheline is marked dirty.  */

#ifndef CONFIG_USER_ONLY

        probe_write(env, addr, cpu_mmu_index(env, 0), ra);

#endif

        break;

    }

}


--- a/source.c
+++ b/source.c
@@ -1,5 +1,5 @@
+static bool vhost_section(MemoryRegionSection *section)
+
 {

     return memory_region_is_ram(section->mr);

static bool vhost_section(MemoryRegionSection *section)

{

    return memory_region_is_ram(section->mr);

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
+static void gen_ove_cyov(DisasContext *dc, TCGv cy, TCGv ov)

+{
+
+    if (dc->tb_flags & SR_OVE) {
+
         TCGv t0 = tcg_temp_new();

         tcg_gen_or_tl(t0, cy, ov);

static void gen_ove_cyov(DisasContext *dc, TCGv cy, TCGv ov)

{

    if (dc->tb_flags & SR_OVE) {

        TCGv t0 = tcg_temp_new();

        tcg_gen_or_tl(t0, cy, ov);

        gen_helper_ove(cpu_env, t0);

        tcg_temp_free(t0);

    }

}


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

     bs = bdrv_find(device);

+    if (!bs || !bs->job) {
+
+        return NULL;
+
     }

     return bs->job;

static BlockJob *find_block_job(const char *device)

{

    BlockDriverState *bs;

    bs = bdrv_find(device);

    if (!bs || !bs->job) {

        return NULL;

    }

    return bs->job;

}


--- a/source.c
+++ b/source.c
@@ -15,11 +15,11 @@
     qdev_init_gpio_in(&s->busdev.qdev, pl110_mux_ctrl_set, 1);

     s->con = graphic_console_init(pl110_update_display,
+
+                                  pl110_invalidate_display,
+
+                                  NULL, NULL, s);
+
     return 0;

 }

static int pl110_init(SysBusDevice *dev)

{

    pl110_state *s = FROM_SYSBUS(pl110_state, dev);

    memory_region_init_io(&s->iomem, &pl110_ops, s, "pl110", 0x1000);

    sysbus_init_mmio(dev, &s->iomem);

    sysbus_init_irq(dev, &s->irq);

    qdev_init_gpio_in(&s->busdev.qdev, pl110_mux_ctrl_set, 1);

    s->con = graphic_console_init(pl110_update_display,

                                  pl110_invalidate_display,

                                  NULL, NULL, s);

    return 0;

}


--- a/source.c
+++ b/source.c
@@ -1,9 +1,9 @@
 static void opt_frame_pad_left(const char *arg)

 {
+
+    frame_padleft = atoi(arg);
+
     if (frame_padleft < 0) {

         fprintf(stderr, "Incorrect left pad size\n");

static void opt_frame_pad_left(const char *arg)

{

    frame_padleft = atoi(arg);

    if (frame_padleft < 0) {

        fprintf(stderr, "Incorrect left pad size\n");

        av_exit(1);

    }

}


--- a/source.c
+++ b/source.c
@@ -5,11 +5,11 @@
     AcpiTableMcfg *mcfg;

     const char *sig;
+
+    int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]);
+
+
+
     mcfg = acpi_data_push(table_data, len);

     mcfg->allocation[0].address = cpu_to_le64(info->mcfg_base);

build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)

{

    AcpiTableMcfg *mcfg;

    const char *sig;

    int len = sizeof(*mcfg) + 1 * sizeof(mcfg->allocation[0]);

    mcfg = acpi_data_push(table_data, len);

    mcfg->allocation[0].address = cpu_to_le64(info->mcfg_base);

    /* Only a single allocation so no need to play with segments */

    mcfg->allocation[0].pci_segment = cpu_to_le16(0);

    mcfg->allocation[0].start_bus_number = 0;

    mcfg->allocation[0].end_bus_number = PCIE_MMCFG_BUS(info->mcfg_size - 1);

    /* MCFG is used for ECAM which can be enabled or disabled by guest.

     * To avoid table size changes (which create migration issues),

     * always create the table even if there are no allocations,

     * but set the signature to a reserved value in this case.

     * ACPI spec requires OSPMs to ignore such tables.

     */

    if (info->mcfg_base == PCIE_BASE_ADDR_UNMAPPED) {

        /* Reserved signature: ignored by OSPM */

        sig = "QEMU";

    } else {

        sig = "MCFG";

    }

    build_header(linker, table_data, (void *)mcfg, sig, len, 1, NULL, NULL);

}


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

 {

+    int64_t filesize, duration;

     int bit_rate, i;

static void av_estimate_timings_from_bit_rate(AVFormatContext *ic)

{

    int64_t filesize, duration;

    int bit_rate, i;

    AVStream *st;

    /* if bit_rate is already set, we believe it */

    if (ic->bit_rate == 0) {

        bit_rate = 0;

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

            st = ic->streams[i];

            bit_rate += st->codec->bit_rate;

        }

        ic->bit_rate = bit_rate;

    }

    /* if duration is already set, we believe it */

    if (ic->duration == AV_NOPTS_VALUE &&

        ic->bit_rate != 0 &&

        ic->file_size != 0)  {

        filesize = ic->file_size;

        if (filesize > 0) {

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

                st = ic->streams[i];

                duration= av_rescale(8*filesize, st->time_base.den, ic->bit_rate*(int64_t)st->time_base.num);

                if (st->duration == AV_NOPTS_VALUE)

                    st->duration = duration;

            }

        }

    }

}


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

     sPAPRDIMMState *ds = spapr_pending_dimm_unplugs_find(spapr, PC_DIMM(dev));

+
+
+    if (--ds->nr_lmbs) {
+
+        return;

     }

static void spapr_lmb_release(DeviceState *dev, void *opaque)

{

    HotplugHandler *hotplug_ctrl = qdev_get_hotplug_handler(dev);

    sPAPRMachineState *spapr = SPAPR_MACHINE(hotplug_ctrl);

    sPAPRDIMMState *ds = spapr_pending_dimm_unplugs_find(spapr, PC_DIMM(dev));

    if (--ds->nr_lmbs) {

        return;

    }

    spapr_pending_dimm_unplugs_remove(spapr, ds);

    /*

     * Now that all the LMBs have been removed by the guest, call the

     * pc-dimm unplug handler to cleanup up the pc-dimm device.

     */

    hotplug_handler_unplug(hotplug_ctrl, dev, &error_abort);

}


static void RENAME(yuv2rgb565_2)(SwsContext *c, const uint16_t *buf0,

                                 const uint16_t *buf1, const uint16_t *ubuf0,

                                 const uint16_t *ubuf1, const uint16_t *vbuf0,

                                 const uint16_t *vbuf1, const uint16_t *abuf0,

                                 const uint16_t *abuf1, uint8_t *dest,

                                 int dstW, int yalpha, int uvalpha, int y)

{

    //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :(

    __asm__ volatile(

        "mov %%"REG_b", "ESP_OFFSET"(%5)        \n\t"

        "mov        %4, %%"REG_b"               \n\t"

        "push %%"REG_BP"                        \n\t"

        YSCALEYUV2RGB(%%REGBP, %5)

        "pxor    %%mm7, %%mm7                   \n\t"

        /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */

#ifdef DITHER1XBPP

        "paddusb "BLUE_DITHER"(%5), %%mm2      \n\t"

        "paddusb "GREEN_DITHER"(%5), %%mm4      \n\t"

        "paddusb "RED_DITHER"(%5), %%mm5      \n\t"

#endif

        WRITERGB16(%%REGb, 8280(%5), %%REGBP)

        "pop %%"REG_BP"                         \n\t"

        "mov "ESP_OFFSET"(%5), %%"REG_b"        \n\t"

        :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),

           "a" (&c->redDither)

    );

}


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

     if (dc->fw_name) {

+        return dc->fw_name;
+
+    } else if (dc->alias) {
+
+        return dc->alias;

     }

const char *qdev_fw_name(DeviceState *dev)

{

    DeviceClass *dc = DEVICE_GET_CLASS(dev);

    if (dc->fw_name) {

        return dc->fw_name;

    } else if (dc->alias) {

        return dc->alias;

    }

    return object_get_typename(OBJECT(dev));

}


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

                               int64_t ts, const AVRational *time_base, int is_duration)

+{
+
+    char buf[128];
+
+

     if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) {

static void writer_print_time(WriterContext *wctx, const char *key,

                              int64_t ts, const AVRational *time_base, int is_duration)

{

    char buf[128];

    if ((!is_duration && ts == AV_NOPTS_VALUE) || (is_duration && ts == 0)) {

        writer_print_string(wctx, key, "N/A", 1);

    } else {

        double d = ts * av_q2d(*time_base);

        struct unit_value uv;

        uv.val.d = d;

        uv.unit = unit_second_str;

        value_string(buf, sizeof(buf), uv);

        writer_print_string(wctx, key, buf, 0);

    }

}


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

                                           const int16_t *block,

+                                          ptrdiff_t stride)
+
+{

     int i;

static void FUNCC(pred8x8_horizontal_add)(uint8_t *pix, const int *block_offset,

                                          const int16_t *block,

                                          ptrdiff_t stride)

{

    int i;

    for(i=0; i<4; i++)

        FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);

}


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

 {

+    uint32_t *qh = (uint32_t *) &q->qh;
+
+    uint32_t dwords = sizeof(EHCIqh) >> 2;

     uint32_t addr = NLPTR_GET(q->qhaddr);

static void ehci_flush_qh(EHCIQueue *q)

{

    uint32_t *qh = (uint32_t *) &q->qh;

    uint32_t dwords = sizeof(EHCIqh) >> 2;

    uint32_t addr = NLPTR_GET(q->qhaddr);

    put_dwords(addr + 3 * sizeof(uint32_t), qh + 3, dwords - 3);

}


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

     /* AioContext is released in .clean() */
+
+    state->aio_context = blk_get_aio_context(blk);
+
+    aio_context_acquire(state->aio_context);
+

     qmp_drive_backup(backup->device, backup->target,

static void drive_backup_prepare(BlkTransactionState *common, Error **errp)

{

    DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common);

    BlockBackend *blk;

    DriveBackup *backup;

    Error *local_err = NULL;

    assert(common->action->kind == TRANSACTION_ACTION_KIND_DRIVE_BACKUP);

    backup = common->action->drive_backup;

    blk = blk_by_name(backup->device);

    if (!blk) {

        error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,

                  "Device '%s' not found", backup->device);

        return;

    }

    /* AioContext is released in .clean() */

    state->aio_context = blk_get_aio_context(blk);

    aio_context_acquire(state->aio_context);

    qmp_drive_backup(backup->device, backup->target,

                     backup->has_format, backup->format,

                     backup->sync,

                     backup->has_mode, backup->mode,

                     backup->has_speed, backup->speed,

                     backup->has_bitmap, backup->bitmap,

                     backup->has_on_source_error, backup->on_source_error,

                     backup->has_on_target_error, backup->on_target_error,

                     &local_err);

    if (local_err) {

        error_propagate(errp, local_err);

        return;

    }

    state->bs = blk_bs(blk);

    state->job = state->bs->job;

}