Page MenuHomePhabricator

new compiler warnings
Closed, ResolvedPublic

Description

These were recently added:

../src/lib/evas/canvas/evas_object_textblock.c: In function ‘evas_textblock_cursor_at_cluster_as_single_glyph’:
../src/lib/evas/canvas/evas_object_textblock.c:9806:10: warning: taking the absolute value of unsigned type ‘size_t’ {aka ‘long unsigned int’} has no effect [-Wabsolute-value]
 9806 |     if ((abs(ret-cur->pos) > 1) && is_single_glyph)
      |          ^~~
../src/lib/evas/canvas/evas_object_textblock.c:9806:10: warning: absolute value function ‘abs’ given an argument of type ‘size_t’ {aka ‘long unsigned int’} but has parameter of type ‘int’ which may cause truncation of value [-Wabsolute-value]

Related Objects

zmike created this task.Sep 10 2019, 6:25 AM
ali.alzyod added a comment.EditedSep 10 2019, 10:31 AM

@zmike do you have special configuration for compilation? (I did not get this error by default)

-Wall -Wextra in CFLAGS

gcc or clang ?

I do not know why I can not get this warning!
Anyway, this will fix it D9903

ali.alzyod closed this task as Resolved.Sep 11 2019, 11:22 PM