From 5e4e1a55b14feef7b00b387d7fc813b402a139b3 Mon Sep 17 00:00:00 2001 From: ChenHengming Date: Mon, 12 Oct 2015 16:48:55 +0000 Subject: [PATCH] [misc]: remove warning on Linux git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@355 6e48237b-75ef-9749-8fc9-41990f28c85a --- mpp/codec/dec/dummy/dummy_dec_api.c | 2 +- mpp/codec/dec/h265/h265d_parser.h | 2 +- mpp/codec/dec/h265/test/h265d_parser_test.c | 5 ++--- mpp/codec/inc/mpp_buf_slot.h | 2 +- mpp/codec/mpp_buf_slot.cpp | 6 +++--- mpp/legacy/vpu_api.cpp | 3 +-- test/mpi_test.c | 3 +++ 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mpp/codec/dec/dummy/dummy_dec_api.c b/mpp/codec/dec/dummy/dummy_dec_api.c index 0a5eed37..c2027854 100644 --- a/mpp/codec/dec/dummy/dummy_dec_api.c +++ b/mpp/codec/dec/dummy/dummy_dec_api.c @@ -130,7 +130,7 @@ MPP_RET dummy_dec_control(void *dec, RK_S32 cmd_type, void *param) MPP_RET dummy_dec_prepare(void *dec, MppPacket pkt, HalDecTask *task) { DummyDec *p; - RK_U32 output; + RK_S32 output; MppFrame frame; RK_U32 frame_count; MppBufSlots slots; diff --git a/mpp/codec/dec/h265/h265d_parser.h b/mpp/codec/dec/h265/h265d_parser.h index d1152bae..0c38f316 100644 --- a/mpp/codec/dec/h265/h265d_parser.h +++ b/mpp/codec/dec/h265/h265d_parser.h @@ -563,7 +563,7 @@ typedef struct HEVCFrame { * A combination of HEVC_FRAME_FLAG_* */ RK_U8 flags; - RK_U32 slot_index; + RK_S32 slot_index; } HEVCFrame; typedef struct HEVCNAL { diff --git a/mpp/codec/dec/h265/test/h265d_parser_test.c b/mpp/codec/dec/h265/test/h265d_parser_test.c index 47160cdd..bedaf2e0 100644 --- a/mpp/codec/dec/h265/test/h265d_parser_test.c +++ b/mpp/codec/dec/h265/test/h265d_parser_test.c @@ -368,7 +368,7 @@ RK_S32 hevc_parser_test(ParserDemoCmdContext_t *cmd) memset(&curtask->refer, -1, sizeof(curtask->refer)); curtask->input = -1; while (!feof(pInFile)) { - RK_U32 index; + RK_S32 index; RK_U8 *tmpbuf = buf; RK_U8 *pos = NULL; @@ -455,7 +455,6 @@ RK_S32 hevc_parser_test(ParserDemoCmdContext_t *cmd) } do { - RK_U32 index; ret = mpp_buf_slot_dequeue(slots, &index, QUEUE_DISPLAY); if (ret == MPP_OK) { mpp_buf_slot_get_prop(slots, index, SLOT_FRAME, &frame); @@ -501,7 +500,7 @@ RK_S32 hevc_parser_test(ParserDemoCmdContext_t *cmd) h265d_flush((void*)mpp_codex_ctx); do { - RK_U32 index; + RK_S32 index; ret = mpp_buf_slot_dequeue(slots, &index, QUEUE_DISPLAY); if (ret == MPP_OK) { mpp_log("get_display for index = %d", index); diff --git a/mpp/codec/inc/mpp_buf_slot.h b/mpp/codec/inc/mpp_buf_slot.h index d8fd0cd0..123a0f88 100644 --- a/mpp/codec/inc/mpp_buf_slot.h +++ b/mpp/codec/inc/mpp_buf_slot.h @@ -122,7 +122,7 @@ extern "C" { */ MPP_RET mpp_buf_slot_init(MppBufSlots *slots); MPP_RET mpp_buf_slot_deinit(MppBufSlots slots); -MPP_RET mpp_buf_slot_setup(MppBufSlots slots, RK_U32 count, RK_U32 size, RK_U32 changed); +MPP_RET mpp_buf_slot_setup(MppBufSlots slots, RK_S32 count, RK_U32 size, RK_U32 changed); RK_U32 mpp_buf_slot_is_changed(MppBufSlots slots); MPP_RET mpp_buf_slot_ready(MppBufSlots slots); RK_U32 mpp_buf_slot_get_size(MppBufSlots slots); diff --git a/mpp/codec/mpp_buf_slot.cpp b/mpp/codec/mpp_buf_slot.cpp index 2299a844..701b12b6 100644 --- a/mpp/codec/mpp_buf_slot.cpp +++ b/mpp/codec/mpp_buf_slot.cpp @@ -187,7 +187,7 @@ struct MppBufSlotsImpl_t { // if slot changed, all will be hold until all slot is unused RK_U32 info_changed; - RK_U32 new_count; + RK_S32 new_count; RK_U32 new_size; // list for display @@ -437,7 +437,7 @@ MPP_RET mpp_buf_slot_deinit(MppBufSlots slots) return MPP_OK; } -MPP_RET mpp_buf_slot_setup(MppBufSlots slots, RK_U32 count, RK_U32 size, RK_U32 changed) +MPP_RET mpp_buf_slot_setup(MppBufSlots slots, RK_S32 count, RK_U32 size, RK_U32 changed) { if (NULL == slots) { mpp_err_f("found NULL input\n"); @@ -624,7 +624,7 @@ MPP_RET mpp_buf_slot_dequeue(MppBufSlots slots, RK_S32 *index, SlotQueueType typ // make sure that this slot is just the next display slot list_del_init(&slot->list); - slot_assert(impl, (RK_U32)slot->index < impl->count); + slot_assert(impl, slot->index < impl->count); slot_ops_with_log(impl, slot, SLOT_DEQUEUE); impl->display_count++; *index = slot->index; diff --git a/mpp/legacy/vpu_api.cpp b/mpp/legacy/vpu_api.cpp index dd552f9f..41e45bff 100644 --- a/mpp/legacy/vpu_api.cpp +++ b/mpp/legacy/vpu_api.cpp @@ -263,7 +263,6 @@ RK_S32 vpu_close_context(VpuCodecContext **ctx) static RK_S32 commit_memory_handle(vpu_display_mem_pool *p, RK_S32 mem_hdl, RK_S32 size) { MppBufferInfo info; - MPP_RET ret = MPP_OK; vpu_display_mem_pool_impl *p_mempool = (vpu_display_mem_pool_impl *)p; memset(&info, 0, sizeof(MppBufferInfo)); @@ -271,7 +270,7 @@ static RK_S32 commit_memory_handle(vpu_display_mem_pool *p, RK_S32 mem_hdl, RK_S info.fd = mem_hdl; info.size = size; p_mempool->size = size; - ret = mpp_buffer_commit(p_mempool->group, &info); + mpp_buffer_commit(p_mempool->group, &info); return mem_hdl; } diff --git a/test/mpi_test.c b/test/mpi_test.c index 602b52b2..84afce73 100644 --- a/test/mpi_test.c +++ b/test/mpi_test.c @@ -262,6 +262,9 @@ MPP_TEST_FAILED: int main(int argc, char **argv) { + (void)argc; + (void)argv; + mpi_test(); return 0; }