From 1752473f331d28c6265a7105fa3fdcc271397d0b Mon Sep 17 00:00:00 2001 From: Herman Chen Date: Wed, 14 Sep 2016 16:05:47 +0800 Subject: [PATCH] [mpi]: fix -Wstrict-prototypes warning Change-Id: If9549b213c6b5d5545186e1289a436957160924f Signed-off-by: Herman Chen --- inc/rk_mpi.h | 2 +- inc/vpu_api.h | 2 +- mpp/hal/vpu/jpege/hal_jpege_api.c | 6 +++--- mpp/hal/vpu/mpg4d/hal_mpg4d_reg.c | 16 ++++------------ 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/inc/rk_mpi.h b/inc/rk_mpi.h index 769c4482..af98339f 100644 --- a/inc/rk_mpi.h +++ b/inc/rk_mpi.h @@ -269,7 +269,7 @@ MPP_RET mpp_destroy(MppCtx ctx); // coding type format function MPP_RET mpp_check_support_format(MppCtxType type, MppCodingType coding); -void mpp_show_support_format(); +void mpp_show_support_format(void); #ifdef __cplusplus } diff --git a/inc/vpu_api.h b/inc/vpu_api.h index 949d8801..1a08e2b7 100644 --- a/inc/vpu_api.h +++ b/inc/vpu_api.h @@ -373,7 +373,7 @@ extern "C" /* * vpu memory handle interface */ -RK_S32 VPUMemJudgeIommu(); +RK_S32 VPUMemJudgeIommu(void); RK_S32 VPUMallocLinear(VPUMemLinear_t *p, RK_U32 size); RK_S32 VPUFreeLinear(VPUMemLinear_t *p); RK_S32 VPUMemDuplicate(VPUMemLinear_t *dst, VPUMemLinear_t *src); diff --git a/mpp/hal/vpu/jpege/hal_jpege_api.c b/mpp/hal/vpu/jpege/hal_jpege_api.c index 9df2bcf7..0133095c 100644 --- a/mpp/hal/vpu/jpege/hal_jpege_api.c +++ b/mpp/hal/vpu/jpege/hal_jpege_api.c @@ -326,17 +326,17 @@ MPP_RET hal_jpege_start(void *hal, HalTaskInfo *task) { MPP_RET ret = MPP_OK; HalJpegeCtx *ctx = (HalJpegeCtx *)hal; - RK_U32 *regs = ctx->regs; - (void)task; hal_jpege_dbg_func("enter hal %p\n", hal); #ifdef RKPLATFORM if (ctx->vpu_fd >= 0) - ret = VPUClientSendReg(ctx->vpu_fd, regs, VPU2_REG_NUM); + ret = VPUClientSendReg(ctx->vpu_fd, ctx->regs, VPU2_REG_NUM); #endif hal_jpege_dbg_func("leave hal %p\n", hal); + (void)ctx; + (void)task; return ret; } diff --git a/mpp/hal/vpu/mpg4d/hal_mpg4d_reg.c b/mpp/hal/vpu/mpg4d/hal_mpg4d_reg.c index af203958..b42dc94e 100644 --- a/mpp/hal/vpu/mpg4d/hal_mpg4d_reg.c +++ b/mpp/hal/vpu/mpg4d/hal_mpg4d_reg.c @@ -15,16 +15,6 @@ * limitations under the License. */ -/* -* @file hal_vpu_mpg4d_reg.c -* @brief -* @author gzl(lance.gao@rock-chips.com) - -* @version 1.0.0 -* @history -* 2016.04.11 : Create -*/ - #define MODULE_TAG "hal_vpu_mpg4d" #include @@ -453,9 +443,9 @@ MPP_RET hal_vpu_mpg4d_gen_regs(void *hal, HalTaskInfo *syn) MPP_RET hal_vpu_mpg4d_start(void *hal, HalTaskInfo *task) { MPP_RET ret = MPP_OK; - hal_mpg4_ctx *ctx = (hal_mpg4_ctx *)hal; #ifdef RKPLATFORM + hal_mpg4_ctx *ctx = (hal_mpg4_ctx *)hal; RK_U32 reg_count = (sizeof(*ctx->regs) / sizeof(RK_U32)); RK_U32* regs = (RK_U32 *)ctx->regs; @@ -469,6 +459,7 @@ MPP_RET hal_vpu_mpg4d_start(void *hal, HalTaskInfo *task) ret = VPUClientSendReg(ctx->vpu_fd, regs, reg_count); #endif (void)ret; + (void)hal; (void)task; return ret; } @@ -476,8 +467,8 @@ MPP_RET hal_vpu_mpg4d_start(void *hal, HalTaskInfo *task) MPP_RET hal_vpu_mpg4d_wait(void *hal, HalTaskInfo *task) { MPP_RET ret = MPP_OK; - hal_mpg4_ctx *ctx = (hal_mpg4_ctx *)hal; #ifdef RKPLATFORM + hal_mpg4_ctx *ctx = (hal_mpg4_ctx *)hal; VpuMpg4dRegSet_t reg_out; RK_U32* regs = (RK_U32 *)®_out; RK_U32 reg_count = (sizeof(reg_out) / sizeof(RK_U32)); @@ -496,6 +487,7 @@ MPP_RET hal_vpu_mpg4d_wait(void *hal, HalTaskInfo *task) } #endif (void)ret; + (void)hal; (void)task; return ret; }