From abcf8edbbe87fceb15ce77da574793123b2c291a Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Sat, 3 Oct 2020 07:12:23 +0200 Subject: [PATCH] libfimg4x: resolve compilation errors Change-Id: I201938251364a108b7910eb42972b4848831fdfc --- libfimg4x/FimgApi.cpp | 8 ++++---- libfimg4x/FimgExynos5.cpp | 20 +++++--------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/libfimg4x/FimgApi.cpp b/libfimg4x/FimgApi.cpp index 2c524a4..b7e7d3d 100644 --- a/libfimg4x/FimgApi.cpp +++ b/libfimg4x/FimgApi.cpp @@ -75,7 +75,7 @@ struct blitinfo_table repeat_tbl[] = { }; #ifndef REAL_DEBUG - void VOID_FUNC(const char *format, ...) + void VOID_FUNC(const char *format __unused, ...) {} #endif @@ -208,7 +208,7 @@ bool FimgApi::t_Destroy(void) return false; } -bool FimgApi::t_Stretch(struct fimg2d_blit *cmd) +bool FimgApi::t_Stretch(struct fimg2d_blit *cmd __unused) { PRINT("%s::This is empty virtual function fail\n", __func__); return false; @@ -431,7 +431,7 @@ void printDataBlit(char *title, const char *called, struct fimg2d_blit *cmd) SLOGI("%s (From %s)\n", title, called); SLOGI(" sequence_no. = %u\n", cmd->seq_no); SLOGI(" blit_op = %d(%s)\n", cmd->op, optbl[cmd->op].str); - SLOGI(" fill_color = %X\n", cmd->param.solid_color); + SLOGI(" fill_color = %lu\n", cmd->param.solid_color); SLOGI(" global_alpha = %u\n", (unsigned int)cmd->param.g_alpha); SLOGI(" PREMULT = %s\n", cmd->param.premult == PREMULTIPLIED ? "PREMULTIPLIED" : "NON-PREMULTIPLIED"); SLOGI(" do_dither = %s\n", cmd->param.dither == true ? "dither" : "no-dither"); @@ -455,7 +455,7 @@ void printDataBlitImage(const char *title, struct fimg2d_image *image) { if (NULL != image) { SLOGI(" Image_%s\n", title); - SLOGI(" addr = %X\n", image->addr.start); + SLOGI(" addr = %lx\n", image->addr.start); SLOGI(" format = %d\n", image->fmt); SLOGI(" size = (%d, %d)\n", image->width, image->height); } else { diff --git a/libfimg4x/FimgExynos5.cpp b/libfimg4x/FimgExynos5.cpp index f96a778..ea03e56 100644 --- a/libfimg4x/FimgExynos5.cpp +++ b/libfimg4x/FimgExynos5.cpp @@ -195,27 +195,17 @@ SYNC_FAIL: bool FimgV4x::t_Lock(void) { - if (&m_lock != NULL) { - status_t ret = m_lock.lock(); - return true; - } - PRINT("%s::m_lock is NULL",__func__); - return false; + return m_lock.lock(); } bool FimgV4x::t_UnLock(void) { - if (&m_lock != NULL) { - m_lock.unlock(); - return true; - } - PRINT("%s::m_lock is NULL",__func__); - return false; + m_lock.unlock(); + return true; } bool FimgV4x::m_CreateG2D(void) { - void * mmap_base; int val = 0; if (m_g2dFd != 0) { @@ -302,7 +292,7 @@ inline bool FimgV4x::m_PollG2D(struct pollfd * events) //---------------------------------------------------------------------------// // extern function //---------------------------------------------------------------------------// -extern "C" struct FimgApi * createFimgApi() +extern "C" FimgApi * createFimgApi() { if (fimgApiAutoFreeThread == 0) fimgApiAutoFreeThread = new FimgApiAutoFreeThread(); @@ -312,7 +302,7 @@ extern "C" struct FimgApi * createFimgApi() return FimgV4x::CreateInstance(); } -extern "C" void destroyFimgApi(FimgApi * ptrFimgApi) +extern "C" void destroyFimgApi(FimgApi * ptrFimgApi __unused) { // Dont' call DestroyInstance. } -- 2.20.1