libavcodec/dxv.c:410: error: Uninitialized Value
  The value read from version_major was never initialized.

libavcodec/dxv.c:410:5: 
408.         size = bytestream2_get_le32(gbc);
409.     }
410.     av_log(avctx, AV_LOG_DEBUG,
         ^
411.            "%s compression with %s texture (version %d.%d)\n",
412.            msgcomp, msgtext, version_major, version_minor);

static int dxv_decode(AVCodecContext *avctx, void *data,
                      int *got_frame, AVPacket *avpkt)
{
    DXVContext *ctx = avctx->priv_data;
    ThreadFrame tframe;
    GetByteContext *gbc = &ctx->gbc;
    int (*decompress_tex)(AVCodecContext *avctx);
    const char *msgcomp, *msgtext;
    uint32_t tag;
    int version_major, version_minor = 0;
    int size = 0, old_type = 0;
    int ret;
    bytestream2_init(gbc, avpkt->data, avpkt->size);
    tag = bytestream2_get_le32(gbc);
    switch (tag) {
    case MKBETAG('D', 'X', 'T', '1'):
        decompress_tex = dxv_decompress_dxt1;
        ctx->tex_funct = ctx->texdsp.dxt1_block;
        ctx->tex_rat   = 8;
        ctx->tex_step  = 8;
        msgcomp = "DXTR1";
        msgtext = "DXT1";
        break;
    case MKBETAG('D', 'X', 'T', '5'):
        decompress_tex = dxv_decompress_dxt5;
        ctx->tex_funct = ctx->texdsp.dxt5_block;
        ctx->tex_rat   = 4;
        ctx->tex_step  = 16;
        msgcomp = "DXTR5";
        msgtext = "DXT5";
        break;
    case MKBETAG('Y', 'C', 'G', '6'):
    case MKBETAG('Y', 'G', '1', '0'):
        avpriv_report_missing_feature(avctx, "Tag 0x%08X", tag);
        return AVERROR_PATCHWELCOME;
    default:
        size = tag & 0x00FFFFFF;
        old_type = tag >> 24;
        version_major = (old_type & 0x0F) - 1;
        if (old_type & 0x80) {
            msgcomp = "RAW";
            decompress_tex = dxv_decompress_raw;
        } else {
            msgcomp = "LZF";
            decompress_tex = dxv_decompress_lzf;
        }
        if (old_type & 0x40) {
            msgtext = "DXT5";
            ctx->tex_funct = ctx->texdsp.dxt5_block;
            ctx->tex_step  = 16;
        } else if (old_type & 0x20 || version_major == 1) {
            msgtext = "DXT1";
            ctx->tex_funct = ctx->texdsp.dxt1_block;
            ctx->tex_step  = 8;
        } else {
            av_log(avctx, AV_LOG_ERROR, "Unsupported header (0x%08X)\n.", tag);
            return AVERROR_INVALIDDATA;
        }
        ctx->tex_rat = 1;
        break;
    }
    if (!old_type) {
        version_major = bytestream2_get_byte(gbc) - 1;
        version_minor = bytestream2_get_byte(gbc);
        if (bytestream2_get_byte(gbc)) {
            msgcomp = "RAW";
            ctx->tex_rat = 1;
            decompress_tex = dxv_decompress_raw;
        }
        bytestream2_skip(gbc, 1);
        size = bytestream2_get_le32(gbc);
    }
    av_log(avctx, AV_LOG_DEBUG,
           "%s compression with %s texture (version %d.%d)\n",
           msgcomp, msgtext, version_major, version_minor);
    if (size != bytestream2_get_bytes_left(gbc)) {
        av_log(avctx, AV_LOG_ERROR,
               "Incomplete or invalid file (header %d, left %d).\n",
               size, bytestream2_get_bytes_left(gbc));
        return AVERROR_INVALIDDATA;
    }
    ctx->tex_size = avctx->coded_width * avctx->coded_height * 4 / ctx->tex_rat;
    ret = av_reallocp(&ctx->tex_data, ctx->tex_size);
    if (ret < 0)
        return ret;
    ret = decompress_tex(avctx);
    if (ret < 0)
        return ret;
    tframe.f = data;
    ret = ff_thread_get_buffer(avctx, &tframe, 0);
    if (ret < 0)
        return ret;
    ff_thread_finish_setup(avctx);
    avctx->execute2(avctx, decompress_texture_thread,
                    tframe.f, NULL, ctx->slice_count);
    tframe.f->pict_type = AV_PICTURE_TYPE_I;
    tframe.f->key_frame = 1;
    *got_frame = 1;
    return avpkt->size;
}
['static int dxv_decode(AVCodecContext *avctx, void *data,\n                      int *got_frame, AVPacket *avpkt)\n{\n    DXVContext *ctx = avctx->priv_data;\n    ThreadFrame tframe;\n    GetByteContext *gbc = &ctx->gbc;\n    int (*decompress_tex)(AVCodecContext *avctx);\n    const char *msgcomp, *msgtext;\n    uint32_t tag;\n    int version_major, version_minor = 0;\n    int size = 0, old_type = 0;\n    int ret;\n    bytestream2_init(gbc, avpkt->data, avpkt->size);\n    tag = bytestream2_get_le32(gbc);\n    switch (tag) {\n    case MKBETAG(\'D\', \'X\', \'T\', \'1\'):\n        decompress_tex = dxv_decompress_dxt1;\n        ctx->tex_funct = ctx->texdsp.dxt1_block;\n        ctx->tex_rat   = 8;\n        ctx->tex_step  = 8;\n        msgcomp = "DXTR1";\n        msgtext = "DXT1";\n        break;\n    case MKBETAG(\'D\', \'X\', \'T\', \'5\'):\n        decompress_tex = dxv_decompress_dxt5;\n        ctx->tex_funct = ctx->texdsp.dxt5_block;\n        ctx->tex_rat   = 4;\n        ctx->tex_step  = 16;\n        msgcomp = "DXTR5";\n        msgtext = "DXT5";\n        break;\n    case MKBETAG(\'Y\', \'C\', \'G\', \'6\'):\n    case MKBETAG(\'Y\', \'G\', \'1\', \'0\'):\n        avpriv_report_missing_feature(avctx, "Tag 0x%08X", tag);\n        return AVERROR_PATCHWELCOME;\n    default:\n        size = tag & 0x00FFFFFF;\n        old_type = tag >> 24;\n        version_major = (old_type & 0x0F) - 1;\n        if (old_type & 0x80) {\n            msgcomp = "RAW";\n            decompress_tex = dxv_decompress_raw;\n        } else {\n            msgcomp = "LZF";\n            decompress_tex = dxv_decompress_lzf;\n        }\n        if (old_type & 0x40) {\n            msgtext = "DXT5";\n            ctx->tex_funct = ctx->texdsp.dxt5_block;\n            ctx->tex_step  = 16;\n        } else if (old_type & 0x20 || version_major == 1) {\n            msgtext = "DXT1";\n            ctx->tex_funct = ctx->texdsp.dxt1_block;\n            ctx->tex_step  = 8;\n        } else {\n            av_log(avctx, AV_LOG_ERROR, "Unsupported header (0x%08X)\\n.", tag);\n            return AVERROR_INVALIDDATA;\n        }\n        ctx->tex_rat = 1;\n        break;\n    }\n    if (!old_type) {\n        version_major = bytestream2_get_byte(gbc) - 1;\n        version_minor = bytestream2_get_byte(gbc);\n        if (bytestream2_get_byte(gbc)) {\n            msgcomp = "RAW";\n            ctx->tex_rat = 1;\n            decompress_tex = dxv_decompress_raw;\n        }\n        bytestream2_skip(gbc, 1);\n        size = bytestream2_get_le32(gbc);\n    }\n    av_log(avctx, AV_LOG_DEBUG,\n           "%s compression with %s texture (version %d.%d)\\n",\n           msgcomp, msgtext, version_major, version_minor);\n    if (size != bytestream2_get_bytes_left(gbc)) {\n        av_log(avctx, AV_LOG_ERROR,\n               "Incomplete or invalid file (header %d, left %d).\\n",\n               size, bytestream2_get_bytes_left(gbc));\n        return AVERROR_INVALIDDATA;\n    }\n    ctx->tex_size = avctx->coded_width * avctx->coded_height * 4 / ctx->tex_rat;\n    ret = av_reallocp(&ctx->tex_data, ctx->tex_size);\n    if (ret < 0)\n        return ret;\n    ret = decompress_tex(avctx);\n    if (ret < 0)\n        return ret;\n    tframe.f = data;\n    ret = ff_thread_get_buffer(avctx, &tframe, 0);\n    if (ret < 0)\n        return ret;\n    ff_thread_finish_setup(avctx);\n    avctx->execute2(avctx, decompress_texture_thread,\n                    tframe.f, NULL, ctx->slice_count);\n    tframe.f->pict_type = AV_PICTURE_TYPE_I;\n    tframe.f->key_frame = 1;\n    *got_frame = 1;\n    return avpkt->size;\n}']