summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2014-01-09 08:53:07 +0100
committerCedric BAIL <cedric.bail@samsung.com>2014-01-10 16:36:12 +0900
commit3f3f652535c156eb486b69c2d5f05e64d259389d (patch)
tree7ebcb06a65a8ad0006673e56707340af31320934 /src/examples
parentc34578b5d188d541a587e614252c98df5d54dbbc (diff)
examples: do not do void* arithmetics in evas examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/evas/evas-hints.c20
-rw-r--r--src/examples/evas/evas-text.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/examples/evas/evas-hints.c b/src/examples/evas/evas-hints.c
index fb11421f24..39deefca14 100644
--- a/src/examples/evas/evas-hints.c
+++ b/src/examples/evas/evas-hints.c
@@ -181,8 +181,8 @@ _on_keydown(void *data EINA_UNUSED,
181 { 181 {
182 (r_data->align_ptr)++; 182 (r_data->align_ptr)++;
183 183
184 if ((unsigned) 184 if ((unsigned int)
185 (((void *)(r_data->align_ptr)) - ((void *)(r_data->align))) >= 185 (((unsigned char *)(r_data->align_ptr)) - ((unsigned char *)(r_data->align))) >=
186 sizeof(r_data->align)) 186 sizeof(r_data->align))
187 r_data->align_ptr = r_data->align; 187 r_data->align_ptr = r_data->align;
188 188
@@ -198,8 +198,8 @@ _on_keydown(void *data EINA_UNUSED,
198 { 198 {
199 (r_data->min_ptr)++; 199 (r_data->min_ptr)++;
200 200
201 if ((unsigned) 201 if ((unsigned int)
202 (((void *)(r_data->min_ptr)) - ((void *)(r_data->min))) >= 202 (((unsigned char *)(r_data->min_ptr)) - ((unsigned char *)(r_data->min))) >=
203 sizeof(r_data->min)) 203 sizeof(r_data->min))
204 r_data->min_ptr = r_data->min; 204 r_data->min_ptr = r_data->min;
205 205
@@ -215,8 +215,8 @@ _on_keydown(void *data EINA_UNUSED,
215 { 215 {
216 (r_data->max_ptr)++; 216 (r_data->max_ptr)++;
217 217
218 if ((unsigned) 218 if ((unsigned int)
219 (((void *)(r_data->max_ptr)) - ((void *)(r_data->max))) >= 219 (((unsigned char *)(r_data->max_ptr)) - ((unsigned char *)(r_data->max))) >=
220 sizeof(r_data->max)) 220 sizeof(r_data->max))
221 r_data->max_ptr = r_data->max; 221 r_data->max_ptr = r_data->max;
222 222
@@ -232,8 +232,8 @@ _on_keydown(void *data EINA_UNUSED,
232 { 232 {
233 (r_data->padding_ptr)++; 233 (r_data->padding_ptr)++;
234 234
235 if ((unsigned) 235 if ((unsigned int)
236 (((void *)(r_data->padding_ptr)) - ((void *)(r_data->padding))) >= 236 (((unsigned char *)(r_data->padding_ptr)) - ((unsigned char *)(r_data->padding))) >=
237 sizeof(r_data->padding)) 237 sizeof(r_data->padding))
238 r_data->padding_ptr = r_data->padding; 238 r_data->padding_ptr = r_data->padding;
239 239
@@ -255,8 +255,8 @@ _on_keydown(void *data EINA_UNUSED,
255 { 255 {
256 (r_data->weight_ptr)++; 256 (r_data->weight_ptr)++;
257 257
258 if ((unsigned) 258 if ((unsigned int)
259 (((void *)(r_data->weight_ptr)) - ((void *)(r_data->weight))) >= 259 (((unsigned char *)(r_data->weight_ptr)) - ((unsigned char *)(r_data->weight))) >=
260 sizeof(r_data->weight)) 260 sizeof(r_data->weight))
261 r_data->weight_ptr = r_data->weight; 261 r_data->weight_ptr = r_data->weight;
262 262
diff --git a/src/examples/evas/evas-text.c b/src/examples/evas/evas-text.c
index b24ac14e7f..d2adc64433 100644
--- a/src/examples/evas/evas-text.c
+++ b/src/examples/evas/evas-text.c
@@ -33,7 +33,7 @@
33#define POINTER_CYCLE(_ptr, _array) \ 33#define POINTER_CYCLE(_ptr, _array) \
34 do \ 34 do \
35 { \ 35 { \
36 if ((unsigned)(((void *)(_ptr)) - ((void *)(_array))) >= \ 36 if ((unsigned int)(((unsigned char *)(_ptr)) - ((unsigned char *)(_array))) >= \
37 sizeof(_array)) \ 37 sizeof(_array)) \
38 _ptr = _array; \ 38 _ptr = _array; \
39 } \ 39 } \