summaryrefslogtreecommitdiff
path: root/src/bin/options_font.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 17:04:17 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-06-17 17:04:17 +0000
commit3fe325aad5ec4b63614185f644ca4b7b56cc6955 (patch)
tree1ae796b5ef5f81866c5878593140ba0b78bc52fe /src/bin/options_font.c
parent3ecf32e825e9a2fa81fbe4d281b7aaebd72ecf31 (diff)
reduce number of warnings with -Wall -Wextra.
there are still some shadow cases to be fixed and some parameters I've left unused since it seems like a bug in the API or code. SVN revision: 72302
Diffstat (limited to 'src/bin/options_font.c')
-rw-r--r--src/bin/options_font.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index 9d72bb0..b2bb656 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -1,3 +1,5 @@
1#include "private.h"
2
1#include <Elementary.h> 3#include <Elementary.h>
2#include "config.h" 4#include "config.h"
3#include "termio.h" 5#include "termio.h"
@@ -36,7 +38,7 @@ _update_sizing(Evas_Object *term)
36} 38}
37 39
38static void 40static void
39_cb_op_font_sel(void *data, Evas_Object *obj, void *event) 41_cb_op_font_sel(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
40{ 42{
41 Font *f = data; 43 Font *f = data;
42 if ((config->font.name) && (!strcmp(f->name, config->font.name))) 44 if ((config->font.name) && (!strcmp(f->name, config->font.name)))
@@ -49,7 +51,7 @@ _cb_op_font_sel(void *data, Evas_Object *obj, void *event)
49} 51}
50 52
51static void 53static void
52_cb_op_fontsize_sel(void *data, Evas_Object *obj, void *event) 54_cb_op_fontsize_sel(void *data, Evas_Object *obj, void *event __UNUSED__)
53{ 55{
54 int size = elm_slider_value_get(obj) + 0.5; 56 int size = elm_slider_value_get(obj) + 0.5;
55 57
@@ -67,7 +69,7 @@ _cb_op_font_sort(const void *d1, const void *d2)
67} 69}
68 70
69static void 71static void
70_cb_op_font_preview_del(void *data, Evas *e, Evas_Object *obj, void *event) 72_cb_op_font_preview_del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
71{ 73{
72 Evas_Object *o; 74 Evas_Object *o;
73 75
@@ -76,7 +78,7 @@ _cb_op_font_preview_del(void *data, Evas *e, Evas_Object *obj, void *event)
76} 78}
77 79
78static void 80static void
79_cb_op_font_preview_eval(void *data, Evas *e, Evas_Object *obj, void *event) 81_cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
80{ 82{
81 Font *f = data; 83 Font *f = data;
82 Evas_Object *o; 84 Evas_Object *o;
@@ -143,12 +145,12 @@ _cb_op_font_content_get(void *data, Evas_Object *obj, const char *part)
143} 145}
144 146
145static char * 147static char *
146_cb_op_font_text_get(void *data, Evas_Object *obj, const char *part) 148_cb_op_font_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
147{ 149{
148 Font *f = data; 150 Font *f = data;
149 char buf[4096], *p; 151 char buf[4096], *p;
150 152
151 snprintf(buf, sizeof(buf), "%s", f->name); 153 eina_strlcpy(buf, f->name, sizeof(buf));
152 buf[0] = toupper(buf[0]); 154 buf[0] = toupper(buf[0]);
153 p = strrchr(buf, '.'); 155 p = strrchr(buf, '.');
154 if (p) *p = 0; 156 if (p) *p = 0;
@@ -156,7 +158,7 @@ _cb_op_font_text_get(void *data, Evas_Object *obj, const char *part)
156} 158}
157 159
158static char * 160static char *
159_cb_op_font_group_text_get(void *data, Evas_Object *obj, const char *part) 161_cb_op_font_group_text_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
160{ 162{
161 return strdup(data); 163 return strdup(data);
162} 164}