[grilo-plugins] lua-factory: _load_goa_data() only if goa is available



commit 50fe652e6838330a9df63663fc38bb0328c3dc1f
Author: Victor Toso <me victortoso com>
Date:   Tue Feb 14 09:11:39 2017 +0100

    lua-factory: _load_goa_data() only if goa is available
    
    Let's wrap grl_lua_library_load_goa_data() to be build only if
    GOA_ENABLED is declared, otherwise we will get -Wunused-function
    
      grl-lua-library.c:1746:1: warning: ‘grl_lua_library_load_goa_data’
      defined but not used [-Wunused-function]
    
    It is also worth to mention that grl_lua_factory_add_goa_source() in
    grl-lua-factory.c is already wrapped this way.
    
    Signed-off-by: Victor Toso <victortoso redhat com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778596

 src/lua-factory/grl-lua-library.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index 0fd2bd6..f5cabb5 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -67,7 +67,9 @@ typedef struct {
   OperationSpec *os;
 } UnzipOperation;
 
+#ifdef GOA_ENABLED
 static gpointer grl_lua_library_load_goa_data (lua_State *L);
+#endif
 
 /* ================== Lua-Library utils/helpers ============================ */
 
@@ -1742,10 +1744,10 @@ grl_lua_library_save_goa_data (lua_State *L, gpointer goa_object)
  * @L: LuaState where the data is stored.
  * @return: The #GoaObject.
  **/
+#ifdef GOA_ENABLED
 static gpointer
 grl_lua_library_load_goa_data (lua_State *L)
 {
-#ifdef GOA_ENABLED
   GoaObject *goa_object;
 
   lua_getglobal (L, GOA_LUA_NAME);
@@ -1753,8 +1755,5 @@ grl_lua_library_load_goa_data (lua_State *L)
   lua_pop(L, 1);
 
   return goa_object;
-#else
-  GRL_WARNING ("grl_lua_library_load_goa_data() called but GOA support disabled.");
-  return NULL;
-#endif /* GOA_ENABLED */
 }
+#endif /* GOA_ENABLED */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]