From fca0b58dc393b176008cc60188dfb51c0ee855e7 Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Fri, 8 Sep 2017 17:07:57 +0900 Subject: [PATCH] Fix build warnings Change-Id: Ibfd8c1a7c43590b09b113680373ea680b0482c15 Signed-off-by: Inkyun Kil --- common/backends.c | 3 +-- daemon/daemon.c | 2 +- vconf-compat/vconf.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/backends.c b/common/backends.c index a91795f..f479a80 100644 --- a/common/backends.c +++ b/common/backends.c @@ -135,7 +135,6 @@ err: static int load_modules(const char *moddir) { DIR *dir; - struct dirent de; struct dirent *result; char *ext; struct module *mod; @@ -149,7 +148,7 @@ static int load_modules(const char *moddir) return -1; } - while ((readdir_r(dir, &de, &result) == 0) && (result != NULL)) { + while ((result = readdir(dir)) != NULL) { ext = strrchr(result->d_name, '.'); if (!ext) continue; diff --git a/daemon/daemon.c b/daemon/daemon.c index b50ffb2..e7ff808 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -223,7 +223,7 @@ static gboolean _send_notis(gpointer key, gpointer value, gpointer data) r = proto_send(cli->fd, MSG_NOTI, (uint8_t *)_data, (int)_len); if (r == -1) { bxt_err("send noti again key : %s pid : %d errno : %d", - key, cli->cred.pid, errno); + (char *)key, cli->cred.pid, errno); if (errno == EWOULDBLOCK || errno == EAGAIN) { free(_data); return FALSE; diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c index 41b9872..0c7b119 100644 --- a/vconf-compat/vconf.c +++ b/vconf-compat/vconf.c @@ -494,7 +494,7 @@ static void _restore_noti_cb(gpointer key, gpointer value, gpointer user_data) if (r == -1) { LOGE("vconf_notify_key_changed: key '%s' add notify error %d", - key, errno); + _key, errno); g_hash_table_remove(noti_tbl, key); } else { _refcnt++; -- 2.7.4