libfimg4x: resolve compilation errors
authorJan Altensen <info@stricted.net>
Sat, 3 Oct 2020 05:12:23 +0000 (07:12 +0200)
committerJan Altensen <info@stricted.net>
Sun, 4 Oct 2020 09:44:55 +0000 (11:44 +0200)
Change-Id: I201938251364a108b7910eb42972b4848831fdfc

libfimg4x/FimgApi.cpp
libfimg4x/FimgExynos5.cpp

index 2c524a4b60bc1da8c8ecf071fcb78f847c65eac9..b7e7d3d12c85baccf18b1b2d80f476fb253d32c3 100644 (file)
@@ -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 {
index f96a778953b62a6021d9a145aa861b3122bbe8a7..ea03e561e22c92fbfdf4111fd124bffc0ab54ba8 100644 (file)
@@ -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.
 }