summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-01-16 21:20:31 +0900
committerSung-jae Park <nicesj.park@samsung.com>2013-01-16 21:20:31 +0900
commit8415f3639890c78403ec76cfa8519e6ab0f3cb32 (patch)
treea4985db7988df3daef105ae331e90b5236ac6c7f
parent0e69067682e233180e5a5b81d2bb0b29e205c5a0 (diff)
downloadprovider-8415f3639890c78403ec76cfa8519e6ab0f3cb32.tar.gz
provider-8415f3639890c78403ec76cfa8519e6ab0f3cb32.tar.bz2
provider-8415f3639890c78403ec76cfa8519e6ab0f3cb32.zip
Fix the GCC 4.7 warning.
Change-Id: Ic6b5aaf5c6de1cb09fc6d1d7182748d845293080
-rw-r--r--packaging/libprovider.spec2
-rw-r--r--src/provider_buffer.c73
2 files changed, 12 insertions, 63 deletions
diff --git a/packaging/libprovider.spec b/packaging/libprovider.spec
index 3f1d492..78be136 100644
--- a/packaging/libprovider.spec
+++ b/packaging/libprovider.spec
@@ -1,6 +1,6 @@
Name: libprovider
Summary: Library for the development of a livebox data provider
-Version: 0.5.8
+Version: 0.5.9
Release: 1
Group: main/app
License: Flora License
diff --git a/src/provider_buffer.c b/src/provider_buffer.c
index 386217f..0871a00 100644
--- a/src/provider_buffer.c
+++ b/src/provider_buffer.c
@@ -464,26 +464,21 @@ struct packet *provider_buffer_lb_mouse_enter(pid_t pid, int handle, const struc
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_LB, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
out:
return NULL;
@@ -498,26 +493,21 @@ struct packet *provider_buffer_lb_mouse_leave(pid_t pid, int handle, const struc
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_LB, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
out:
return NULL;
@@ -532,26 +522,21 @@ struct packet *provider_buffer_lb_mouse_down(pid_t pid, int handle, const struct
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_LB, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
out:
return NULL;
@@ -566,26 +551,21 @@ struct packet *provider_buffer_lb_mouse_up(pid_t pid, int handle, const struct p
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_LB, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
out:
return NULL;
@@ -600,26 +580,21 @@ struct packet *provider_buffer_lb_mouse_move(pid_t pid, int handle, const struct
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_LB, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
out:
return NULL;
@@ -634,26 +609,21 @@ struct packet *provider_buffer_pd_mouse_enter(pid_t pid, int handle, const struc
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_PD, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_ENTER, timestamp, x, y, info->data);
out:
return NULL;
@@ -668,26 +638,21 @@ struct packet *provider_buffer_pd_mouse_leave(pid_t pid, int handle, const struc
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_PD, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_LEAVE, timestamp, x, y, info->data);
out:
return NULL;
@@ -702,26 +667,21 @@ struct packet *provider_buffer_pd_mouse_down(pid_t pid, int handle, const struct
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_PD, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_DOWN, timestamp, x, y, info->data);
out:
return NULL;
@@ -736,26 +696,21 @@ struct packet *provider_buffer_pd_mouse_up(pid_t pid, int handle, const struct p
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_PD, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_UP, timestamp, x, y, info->data);
out:
return NULL;
@@ -770,27 +725,21 @@ struct packet *provider_buffer_pd_mouse_move(pid_t pid, int handle, const struct
double x;
double y;
double timestamp;
- int ret;
struct livebox_buffer *info;
- ret = packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y);
- if (ret != 7) {
+ if (packet_get(packet, "ssiiddd", &pkgname, &id, &w, &h, &timestamp, &x, &y) != 7) {
ErrPrint("Invalid packet\n");
- ret = -EINVAL;
goto out;
}
info = provider_buffer_find_buffer(TYPE_PD, pkgname, id);
if (!info) {
ErrPrint("Failed to find a buffer [%s:%s]\n", pkgname, id);
- ret = -ENOENT;
goto out;
}
if (info->handler)
- ret = info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
- else
- ret = -ENOSYS;
+ (void)info->handler(info, BUFFER_EVENT_MOVE, timestamp, x, y, info->data);
out:
return NULL;