libavcodec/sanm.c:1388: error: Uninitialized Value
  The value read from tmp[_] was never initialized.

libavcodec/sanm.c:1388:25: 
1386.                             tmp[j] = av_clip_uint8((t * 129 + ctx->delta_pal[i * 3 + j]) >> 7);
1387.                         }
1388.                         ctx->pal[i] = 0xFFU << 24 | AV_RB24(tmp);
                              ^
1389.                     }
1390.                 } else {

static int decode_frame(AVCodecContext *avctx, void *data,
                        int *got_frame_ptr, AVPacket *pkt)
{
    SANMVideoContext *ctx = avctx->priv_data;
    int i, ret;
    ctx->frame = data;
    bytestream2_init(&ctx->gb, pkt->data, pkt->size);
    if (!ctx->version) {
        int to_store = 0;
        while (bytestream2_get_bytes_left(&ctx->gb) >= 8) {
            uint32_t sig, size;
            int pos;
            sig  = bytestream2_get_be32u(&ctx->gb);
            size = bytestream2_get_be32u(&ctx->gb);
            pos  = bytestream2_tell(&ctx->gb);
            if (bytestream2_get_bytes_left(&ctx->gb) < size) {
                av_log(avctx, AV_LOG_ERROR, "Incorrect chunk size %d.\n", size);
                break;
            }
            switch (sig) {
            case MKBETAG('N', 'P', 'A', 'L'):
                if (size != PALETTE_SIZE * 3) {
                    av_log(avctx, AV_LOG_ERROR,
                           "Incorrect palette block size %d.\n", size);
                    return AVERROR_INVALIDDATA;
                }
                for (i = 0; i < PALETTE_SIZE; i++)
                    ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24u(&ctx->gb);
                break;
            case MKBETAG('F', 'O', 'B', 'J'):
                if (size < 16)
                    return AVERROR_INVALIDDATA;
                if (ret = process_frame_obj(ctx))
                    return ret;
                break;
            case MKBETAG('X', 'P', 'A', 'L'):
                if (size == 6 || size == 4) {
                    uint8_t tmp[3];
                    int j;
                    for (i = 0; i < PALETTE_SIZE; i++) {
                        for (j = 0; j < 3; j++) {
                            int t = (ctx->pal[i] >> (16 - j * 8)) & 0xFF;
                            tmp[j] = av_clip_uint8((t * 129 + ctx->delta_pal[i * 3 + j]) >> 7);
                        }
                        ctx->pal[i] = 0xFFU << 24 | AV_RB24(tmp);
                    }
                } else {
                    if (size < PALETTE_DELTA * 2 + 4) {
                        av_log(avctx, AV_LOG_ERROR, "Incorrect palette change block size %d.\n",
                               size);
                        return AVERROR_INVALIDDATA;
                    }
                    bytestream2_skipu(&ctx->gb, 4);
                    for (i = 0; i < PALETTE_DELTA; i++)
                        ctx->delta_pal[i] = bytestream2_get_le16u(&ctx->gb);
                    if (size >= PALETTE_DELTA * 5 + 4) {
                        for (i = 0; i < PALETTE_SIZE; i++)
                            ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24u(&ctx->gb);
                    } else {
                        memset(ctx->pal, 0, sizeof(ctx->pal));
                    }
                }
                break;
            case MKBETAG('S', 'T', 'O', 'R'):
                to_store = 1;
                break;
            case MKBETAG('F', 'T', 'C', 'H'):
                memcpy(ctx->frm0, ctx->stored_frame, ctx->buf_size);
                break;
            default:
                bytestream2_skip(&ctx->gb, size);
                av_log(avctx, AV_LOG_DEBUG, "Unknown/unsupported chunk %x.\n", sig);
                break;
            }
            bytestream2_seek(&ctx->gb, pos + size, SEEK_SET);
            if (size & 1)
                bytestream2_skip(&ctx->gb, 1);
        }
        if (to_store)
            memcpy(ctx->stored_frame, ctx->frm0, ctx->buf_size);
        if ((ret = copy_output(ctx, NULL)))
            return ret;
        memcpy(ctx->frame->data[1], ctx->pal, 1024);
    } else {
        SANMFrameHeader header;
        if ((ret = read_frame_header(ctx, &header)))
            return ret;
        ctx->rotate_code = header.rotate_code;
        if ((ctx->frame->key_frame = !header.seq_num)) {
            ctx->frame->pict_type = AV_PICTURE_TYPE_I;
            fill_frame(ctx->frm1, ctx->npixels, header.bg_color);
            fill_frame(ctx->frm2, ctx->npixels, header.bg_color);
        } else {
            ctx->frame->pict_type = AV_PICTURE_TYPE_P;
        }
        if (header.codec < FF_ARRAY_ELEMS(v1_decoders)) {
            if ((ret = v1_decoders[header.codec](ctx))) {
                av_log(avctx, AV_LOG_ERROR,
                       "Subcodec %d: error decoding frame.\n", header.codec);
                return ret;
            }
        } else {
            avpriv_request_sample(avctx, "Subcodec %d", header.codec);
            return AVERROR_PATCHWELCOME;
        }
        if ((ret = copy_output(ctx, &header)))
            return ret;
    }
    if (ctx->rotate_code)
        rotate_bufs(ctx, ctx->rotate_code);
    *got_frame_ptr = 1;
    return pkt->size;
}
['static int decode_frame(AVCodecContext *avctx, void *data,\n                        int *got_frame_ptr, AVPacket *pkt)\n{\n    SANMVideoContext *ctx = avctx->priv_data;\n    int i, ret;\n    ctx->frame = data;\n    bytestream2_init(&ctx->gb, pkt->data, pkt->size);\n    if (!ctx->version) {\n        int to_store = 0;\n        while (bytestream2_get_bytes_left(&ctx->gb) >= 8) {\n            uint32_t sig, size;\n            int pos;\n            sig  = bytestream2_get_be32u(&ctx->gb);\n            size = bytestream2_get_be32u(&ctx->gb);\n            pos  = bytestream2_tell(&ctx->gb);\n            if (bytestream2_get_bytes_left(&ctx->gb) < size) {\n                av_log(avctx, AV_LOG_ERROR, "Incorrect chunk size %d.\\n", size);\n                break;\n            }\n            switch (sig) {\n            case MKBETAG(\'N\', \'P\', \'A\', \'L\'):\n                if (size != PALETTE_SIZE * 3) {\n                    av_log(avctx, AV_LOG_ERROR,\n                           "Incorrect palette block size %d.\\n", size);\n                    return AVERROR_INVALIDDATA;\n                }\n                for (i = 0; i < PALETTE_SIZE; i++)\n                    ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24u(&ctx->gb);\n                break;\n            case MKBETAG(\'F\', \'O\', \'B\', \'J\'):\n                if (size < 16)\n                    return AVERROR_INVALIDDATA;\n                if (ret = process_frame_obj(ctx))\n                    return ret;\n                break;\n            case MKBETAG(\'X\', \'P\', \'A\', \'L\'):\n                if (size == 6 || size == 4) {\n                    uint8_t tmp[3];\n                    int j;\n                    for (i = 0; i < PALETTE_SIZE; i++) {\n                        for (j = 0; j < 3; j++) {\n                            int t = (ctx->pal[i] >> (16 - j * 8)) & 0xFF;\n                            tmp[j] = av_clip_uint8((t * 129 + ctx->delta_pal[i * 3 + j]) >> 7);\n                        }\n                        ctx->pal[i] = 0xFFU << 24 | AV_RB24(tmp);\n                    }\n                } else {\n                    if (size < PALETTE_DELTA * 2 + 4) {\n                        av_log(avctx, AV_LOG_ERROR, "Incorrect palette change block size %d.\\n",\n                               size);\n                        return AVERROR_INVALIDDATA;\n                    }\n                    bytestream2_skipu(&ctx->gb, 4);\n                    for (i = 0; i < PALETTE_DELTA; i++)\n                        ctx->delta_pal[i] = bytestream2_get_le16u(&ctx->gb);\n                    if (size >= PALETTE_DELTA * 5 + 4) {\n                        for (i = 0; i < PALETTE_SIZE; i++)\n                            ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24u(&ctx->gb);\n                    } else {\n                        memset(ctx->pal, 0, sizeof(ctx->pal));\n                    }\n                }\n                break;\n            case MKBETAG(\'S\', \'T\', \'O\', \'R\'):\n                to_store = 1;\n                break;\n            case MKBETAG(\'F\', \'T\', \'C\', \'H\'):\n                memcpy(ctx->frm0, ctx->stored_frame, ctx->buf_size);\n                break;\n            default:\n                bytestream2_skip(&ctx->gb, size);\n                av_log(avctx, AV_LOG_DEBUG, "Unknown/unsupported chunk %x.\\n", sig);\n                break;\n            }\n            bytestream2_seek(&ctx->gb, pos + size, SEEK_SET);\n            if (size & 1)\n                bytestream2_skip(&ctx->gb, 1);\n        }\n        if (to_store)\n            memcpy(ctx->stored_frame, ctx->frm0, ctx->buf_size);\n        if ((ret = copy_output(ctx, NULL)))\n            return ret;\n        memcpy(ctx->frame->data[1], ctx->pal, 1024);\n    } else {\n        SANMFrameHeader header;\n        if ((ret = read_frame_header(ctx, &header)))\n            return ret;\n        ctx->rotate_code = header.rotate_code;\n        if ((ctx->frame->key_frame = !header.seq_num)) {\n            ctx->frame->pict_type = AV_PICTURE_TYPE_I;\n            fill_frame(ctx->frm1, ctx->npixels, header.bg_color);\n            fill_frame(ctx->frm2, ctx->npixels, header.bg_color);\n        } else {\n            ctx->frame->pict_type = AV_PICTURE_TYPE_P;\n        }\n        if (header.codec < FF_ARRAY_ELEMS(v1_decoders)) {\n            if ((ret = v1_decoders[header.codec](ctx))) {\n                av_log(avctx, AV_LOG_ERROR,\n                       "Subcodec %d: error decoding frame.\\n", header.codec);\n                return ret;\n            }\n        } else {\n            avpriv_request_sample(avctx, "Subcodec %d", header.codec);\n            return AVERROR_PATCHWELCOME;\n        }\n        if ((ret = copy_output(ctx, &header)))\n            return ret;\n    }\n    if (ctx->rotate_code)\n        rotate_bufs(ctx, ctx->rotate_code);\n    *got_frame_ptr = 1;\n    return pkt->size;\n}']