system-monitor: fixed a potentially uninitialized variable warning.
[profile/ivi/murphy.git] / src / plugins / system-monitor / process-watch.c
index 5042367..b4dab19 100644 (file)
@@ -84,7 +84,7 @@ MRP_LUA_DEFINE_CLASS(process_watch, lua, process_watch_lua_t,
                      process_watch_destroy, process_watch_methods,
                      process_watch_overrides, process_watch_members, NULL,
                      process_watch_changed, process_watch_tostring, NULL,
-                     MRP_LUA_CLASS_EXTENSIBLE | MRP_LUA_CLASS_PRIVREFS);
+                     MRP_LUA_CLASS_EXTENSIBLE);
 
 MRP_LUA_CLASS_CHECKER(process_watch_lua_t, process_watch_lua,
                       PROCESS_WATCH_LUA_CLASS);
@@ -330,7 +330,8 @@ int process_event_mask(lua_State *L, int idx)
     mask = 0;
     MRP_LUA_FOREACH_ALL(L, i, idx, ktype, name, len) {
         if (ktype != LUA_TNUMBER || (type = lua_type(L, -1)) != LUA_TSTRING) {
-            mrp_log_warning("ignoring invalid event (0x%x: 0x%x)", ktype, type);
+            mrp_log_warning("ignoring invalid event (0x%x: 0x%x)", ktype,
+                            ktype == LUA_TNUMBER ? type : 0);
             continue;
         }
         else