API void config_parser_foreach(const char *name, const char *group, config_parser_foreach_func func)
{
- int i;
+ size_t i;
gsize len;
gchar *value;
GError *err = NULL;
GVariant *parameters, GDBusMethodInvocation *invocation,
gpointer user_data)
{
- int i;
+ (void) connection;
+ (void) sender;
+ (void) object_path;
+ (void) interface_name;
+ size_t i;
struct dbus_method_handle *handle;
int name_len;
struct dbus_method *methods, const size_t num_methods, gchar *xml)
{
gchar buf[DBUS_BUF_SIZE];
- int i;
+ size_t i;
g_snprintf(buf, DBUS_BUF_SIZE, DBUS_XML_PREFIX, interface);
g_strlcat(xml, buf, DBUS_BUF_SIZE);
const gchar *interface_name, const gchar *signal_name,
GVariant *parameters, gpointer user_data)
{
+ (void) connection;
+ (void) sender;
+ (void) object_path;
+ (void) interface_name;
+ (void) signal_name;
struct dbus_signal *signal = (struct dbus_signal *)user_data;
if (!signal || !signal->callback)
return;
API void dbus_exit(void)
{
- int i;
+ size_t i;
struct dbus_signal_handle *signal_handle;
struct dbus_method_handle *method_handle;
GDBusConnection *conn = dbus_get_connection();
static gboolean event_worker_source_dispatch(GSource *source,
GSourceFunc callback, gpointer user_data)
{
+ (void) source;
struct event_worker *worker = user_data;
struct event *event;
#undef LOG_TAG
#define LOG_TAG "RESOURCED"
-#define _D(fmt, arg...) SLOGD(fmt, ##arg)
-#define _I(fmt, arg...) SLOGI(fmt, ##arg)
-#define _W(fmt, arg...) SLOGW(fmt, ##arg)
-#define _E(fmt, arg...) SLOGE(fmt, ##arg)
+#define _D(fmt, ...) SLOGD(fmt, ##__VA_ARGS__)
+#define _I(fmt, ...) SLOGI(fmt, ##__VA_ARGS__)
+#define _W(fmt, ...) SLOGW(fmt, ##__VA_ARGS__)
+#define _E(fmt, ...) SLOGE(fmt, ##__VA_ARGS__)
#endif /* __RESOURCED_HEADLESS_LOG_H__ */
static void module_exit(struct module *module, void *user_data)
{
+ (void) user_data;
int ret;
if (module->event_handler) {
static gboolean memory_killer_notify(gpointer user_data)
{
+ (void) user_data;
static enum memory_level last_level = MEMORY_LEVEL_NORMAL;
enum memory_level cur_level;
int ret;
*/
static void memory_killer_add_whitelist(const char *key, const void *not_used)
{
+ (void) not_used;
gchar *basename;
basename = g_strndup(key, strlen(key));
static void proc_usage_dbus_all_apps_memory_usage(GDBusMethodInvocation *invocation, GVariant *params)
{
+ (void) params;
proc_usage_dbus_push_event(PROC_USAGE_EVENT_ALL_APPS_MEMORY_USAGE, invocation, NULL);
}
static void proc_usage_dbus_all_apps_cpu_usage(GDBusMethodInvocation *invocation, GVariant *params)
{
+ (void) params;
proc_usage_dbus_push_event(PROC_USAGE_EVENT_ALL_APPS_CPU_USAGE, invocation, NULL);
}
void test_event(GDBusMethodInvocation *invocation, GVariant *params)
{
+ (void) params;
int *arg_broadcast = malloc(sizeof(int));
int *arg_send = malloc(sizeof(int));
gint err_code;
static gboolean watchdog_check_cb(gpointer data)
{
+ (void) data;
int oom_score_adj = 0, ret;
pid_t pid = watchdog_info.pid;