From f09a3b5ca3b939c9683b0794eff35c73db75d24c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 8 Oct 2019 16:49:02 +0200 Subject: [PATCH] efl_ui/container: remove erroneous negative value checks for uint params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: ../src/lib/elementary/efl_ui_box.c: In function ‘_efl_ui_box_efl_gfx_arrangement_content_padding_set’: ../src/lib/elementary/efl_ui_box.c:411:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limit ] 411 | if (h < 0) h = 0; | ^ ../src/lib/elementary/efl_ui_box.c:412:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limit ] 412 | if (v < 0) v = 0; | ^ ../src/lib/elementary/efl_ui_table.c: In function ‘_efl_ui_table_efl_gfx_arrangement_content_padding_set’: ../src/lib/elementary/efl_ui_table.c:272:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 272 | if (h < 0) h = 0; | ^ ../src/lib/elementary/efl_ui_table.c:273:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 273 | if (v < 0) v = 0; | ^ Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10304 --- src/lib/elementary/efl_ui_box.c | 3 --- src/lib/elementary/efl_ui_table.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index 7d97ec3f85..4f3b29f068 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -408,9 +408,6 @@ _efl_ui_box_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, EOLIAN static void _efl_ui_box_efl_gfx_arrangement_content_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, unsigned int h, unsigned int v) { - if (h < 0) h = 0; - if (v < 0) v = 0; - if (EINA_DBL_EQ(pd->pad.h, h) && EINA_DBL_EQ(pd->pad.v, v)) return; diff --git a/src/lib/elementary/efl_ui_table.c b/src/lib/elementary/efl_ui_table.c index 9e70116953..db259b0dd3 100644 --- a/src/lib/elementary/efl_ui_table.c +++ b/src/lib/elementary/efl_ui_table.c @@ -269,9 +269,6 @@ _efl_ui_table_efl_object_invalidate(Eo *obj, Efl_Ui_Table_Data *pd) EOLIAN static void _efl_ui_table_efl_gfx_arrangement_content_padding_set(Eo *obj, Efl_Ui_Table_Data *pd, unsigned int h, unsigned int v) { - if (h < 0) h = 0; - if (v < 0) v = 0; - if (EINA_DBL_EQ(pd->pad.h, h) && EINA_DBL_EQ(pd->pad.v, v)) return;