From 6aace19c0dee3e462b21b175360d4db009466000 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Fri, 22 Jun 2012 21:54:26 +0000 Subject: [PATCH] evas/cserve2: Silent some warnings (and also fix wrong code). SVN revision: 72705 --- legacy/evas/src/bin/evas_cserve2_cache.c | 22 +++++++++---------- legacy/evas/src/bin/evas_cserve2_requests.c | 4 ++-- legacy/evas/src/lib/cserve2/evas_cs2_client.c | 6 ++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/legacy/evas/src/bin/evas_cserve2_cache.c b/legacy/evas/src/bin/evas_cserve2_cache.c index b8826cfb1b..a4dcae1990 100644 --- a/legacy/evas/src/bin/evas_cserve2_cache.c +++ b/legacy/evas/src/bin/evas_cserve2_cache.c @@ -1309,7 +1309,7 @@ _font_load_request_build(void *data, int *size) } static void -_font_load_request_free(void *msg, void *data) +_font_load_request_free(void *msg, void *data __UNUSED__) { free(msg); } @@ -1359,7 +1359,7 @@ static Font_Request_Funcs _font_load_funcs = { static Eina_Bool _glyphs_request_check(Glyphs_Request *req) { - int i; + unsigned int i; Font_Entry *fe = req->fe; req->answer = malloc(sizeof(*req->answer) * req->nglyphs); @@ -1390,7 +1390,7 @@ static Eina_List * _glyphs_group_create(Glyphs_Request *req) { Eina_List *groups = NULL; - int i; + unsigned int i; for (i = 0; i < req->nanswer; i++) { @@ -1592,7 +1592,7 @@ _glyphs_request_free(Glyphs_Request *req) static void _glyphs_load_request_prepare(Glyphs_Request *req) { - int i, max; + unsigned int i, max; req->nrender = 0; Font_Entry *fe = req->fe; @@ -1621,7 +1621,7 @@ _glyphs_load_request_prepare(Glyphs_Request *req) } static void * -_glyphs_load_request_build(void *data, int *size) +_glyphs_load_request_build(void *data, int *size __UNUSED__) { Glyphs_Request *req = data; Slave_Msg_Font_Glyphs_Load *msg = NULL; @@ -1663,20 +1663,20 @@ _glyphs_load_request_free(void *msg, void *data) } static void -_glyphs_load_request_response(Client *client, void *data, void *resp, unsigned int rid) +_glyphs_load_request_response(Client *client __UNUSED__, void *data, void *resp, unsigned int rid) { Glyphs_Request *req = data; Slave_Msg_Font_Glyphs_Loaded *msg = resp; Font_Entry *fe = req->fe; Font_Cache *fc = NULL; - int i = 0; + unsigned int i = 0; if (fe->last_cache && fe->last_cache->shm == msg->caches[0]->shm) fc = fe->last_cache; while (i < msg->ncaches) { - int j; + unsigned int j; Slave_Msg_Font_Cache *c = msg->caches[i++]; if (!fc) @@ -1732,7 +1732,7 @@ _glyphs_load_request_response(Client *client, void *data, void *resp, unsigned i } static void -_glyphs_load_request_failed(Client *client, void *data, Error_Type error, unsigned int rid) +_glyphs_load_request_failed(Client *client __UNUSED__, void *data __UNUSED__, Error_Type error __UNUSED__, unsigned int rid __UNUSED__) { } @@ -1787,7 +1787,7 @@ _font_entry_stats_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED_ } static void -_cserve2_cache_image_stats_get(Msg_Stats *msg) +_cserve2_cache_image_stats_get(Msg_Stats *msg __UNUSED__) { } @@ -2374,7 +2374,7 @@ cserve2_cache_font_load(Client *client, const char *source, unsigned int sourcel } int -cserve2_cache_font_unload(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid) +cserve2_cache_font_unload(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid __UNUSED__) { Font_Entry *fe; char *fullname; diff --git a/legacy/evas/src/bin/evas_cserve2_requests.c b/legacy/evas/src/bin/evas_cserve2_requests.c index c0777e46b4..11a2e0bb1b 100644 --- a/legacy/evas/src/bin/evas_cserve2_requests.c +++ b/legacy/evas/src/bin/evas_cserve2_requests.c @@ -40,7 +40,7 @@ static struct _Request_Match { { CSERVE2_REQ_FONT_LOAD, SLAVE_FONT, FONT_LOAD }, { CSERVE2_REQ_FONT_GLYPHS_LOAD, SLAVE_FONT, FONT_GLYPHS_LOAD }, - { CSERVE2_REQ_LAST, 0 } + { CSERVE2_REQ_LAST, 0, 0 } }; static Slave *_create_image_slave(void *data); @@ -377,7 +377,7 @@ _cserve2_request_dispatch(Slave_Worker *sw, Slave_Command ctype, Font_Request *r static void _cserve2_requests_process(void) { - int rtype, j; + unsigned int rtype, j; for (rtype = 0; rtype < CSERVE2_REQ_LAST; rtype++) { diff --git a/legacy/evas/src/lib/cserve2/evas_cs2_client.c b/legacy/evas/src/lib/cserve2/evas_cs2_client.c index 1d192294b9..97ccd8efe6 100644 --- a/legacy/evas/src/lib/cserve2/evas_cs2_client.c +++ b/legacy/evas/src/lib/cserve2/evas_cs2_client.c @@ -156,12 +156,12 @@ static Eina_Bool _server_send(const void *buf, int size, Op_Callback cb, void *data) { const Msg_Base *msg; - if (_server_safe_send(socketfd, &size, sizeof(size)) == -1) + if (!_server_safe_send(socketfd, &size, sizeof(size))) { ERR("Couldn't send message size to server."); return EINA_FALSE; } - if (_server_safe_send(socketfd, buf, size) == -1) + if (!_server_safe_send(socketfd, buf, size)) { ERR("Couldn't send message body to server."); return EINA_FALSE; @@ -978,7 +978,7 @@ _glyph_request_cb(void *data, const void *msg) const Msg_Font_Glyphs_Loaded *resp = msg; Glyph_Request_Data *grd = data; Font_Entry *fe = grd->fe; - int ncaches = 0; + unsigned int ncaches = 0; const char *buf; if (resp->base.type == CSERVE2_ERROR)