silence most left over compiler warnings

Summary: silence -Wshadow -Wunused-variable -Wunused-parameter

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7473
This commit is contained in:
Jérémy Zurcher 2018-12-18 13:01:34 +01:00 committed by Xavi Artigas
parent 83a0e83e3f
commit 8a617fda97
11 changed files with 18 additions and 20 deletions

View File

@ -347,10 +347,10 @@ main(int argc, char **argv)
{
int fd;
struct sockaddr_un client;
socklen_t len;
socklen_t slen;
len = sizeof(struct sockaddr_un);
fd = accept(sock, (struct sockaddr *)&client, &len);
slen = sizeof(struct sockaddr_un);
fd = accept(sock, (struct sockaddr *)&client, &slen);
DBG("Accepting connection.");
elm_quicklaunch_sub_init(argc, argv);

View File

@ -249,7 +249,7 @@ draw_gear(GLData *gld, Gear *gear, GLfloat *m,
gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE,
6 * sizeof(GLfloat), NULL);
gl->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,
6 * sizeof(GLfloat), (GLfloat *) 0 + 3);
6 * sizeof(GLfloat), (GLfloat *)(0 + 3 * sizeof(GLfloat *)));
gl->glEnableVertexAttribArray(0);
gl->glEnableVertexAttribArray(1);
gl->glDrawArrays(GL_TRIANGLE_STRIP, 0, gear->count);

View File

@ -461,7 +461,7 @@ draw_gear(GLData *gld, Gear *gear, GLfloat *transform,
// Set up the position of the attributes in the vertex buffer object
gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), NULL);
gl->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLfloat *) 0 + 3);
gl->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLfloat *)(0 + 3 * sizeof(GLfloat *)));
// Enable the attributes
gl->glEnableVertexAttribArray(0);

View File

@ -380,7 +380,6 @@ _efl_model_composite_selection_children_efl_model_property_set(Eo *obj,
Eo *parent;
Eina_Value *vs;
unsigned long selected = 0;
Eina_Bool success;
// In this case we need to first unselect the previously selected one
// and then commit the change to this one.

View File

@ -3836,7 +3836,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Edje_Real_Part *confine_to = NULL;
Edje_Real_Part *threshold = NULL;
FLOAT_T pos = ZERO, pos2;
Edje_Calc_Params lp3 = { 0 };
Edje_Calc_Params lp3 = { { 0 } };
Evas_Coord mmw = 0, mmh = 0;
Eina_Bool map_colors_free = EINA_FALSE;

View File

@ -174,7 +174,7 @@ elm_object_focus_cycle(Evas_Object *obj,
}
static Evas_Object*
_get_legacy_target(Evas_Object *eo, Elm_Widget_Smart_Data *pd, Elm_Focus_Direction dir)
_get_legacy_target(EINA_UNUSED Evas_Object *eo, Elm_Widget_Smart_Data *pd, Elm_Focus_Direction dir)
{
Evas_Object *result = NULL;
@ -245,8 +245,8 @@ elm_object_focus_next(Evas_Object *obj,
{
Evas_Object *parent = eina_array_data_get(old_chain, i);
if (!elm_widget_is(parent)) continue;
ELM_WIDGET_DATA_GET_OR_RETURN(parent, pd);
legacy_target = _get_legacy_target(parent, pd, dir);
ELM_WIDGET_DATA_GET_OR_RETURN(parent, ppd);
legacy_target = _get_legacy_target(parent, ppd, dir);
if (legacy_target) break;
}
eina_array_free(new_chain);

View File

@ -4248,8 +4248,8 @@ _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data
elm_gengrid_item_selected_set(eo_it, EINA_TRUE);
else
{
ELM_GENGRID_ITEM_DATA_GET(eo_it, pd);
if (pd->realized)
ELM_GENGRID_ITEM_DATA_GET(eo_it, pd_it);
if (pd_it->realized)
efl_ui_focus_manager_focus_set(obj, eo_it);
}
}
@ -4261,7 +4261,7 @@ _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data
}
static Efl_Ui_Focus_Object*
_select_candidate(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction)
_select_candidate(Eo *obj, EINA_UNUSED Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction)
{
Elm_Object_Item *first = elm_gengrid_first_item_get(obj);
Elm_Object_Item *last = elm_gengrid_last_item_get(obj);
@ -4304,7 +4304,7 @@ _elm_gengrid_efl_ui_focus_manager_move(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Foc
}
EOLIAN static Efl_Ui_Focus_Object*
_elm_gengrid_efl_ui_focus_manager_manager_focus_get(const Eo *obj, Elm_Gengrid_Data *pd)
_elm_gengrid_efl_ui_focus_manager_manager_focus_get(const Eo *obj, EINA_UNUSED Elm_Gengrid_Data *pd)
{
Eo *focused_obj = efl_ui_focus_manager_focus_get(efl_super(obj, MY_CLASS));
Eo *registered_manager = efl_ui_focus_object_focus_manager_get(obj);

View File

@ -3444,7 +3444,7 @@ _elm_genlist_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Genlist_Data
}
EOLIAN static Efl_Ui_Focus_Object*
_elm_genlist_efl_ui_focus_manager_manager_focus_get(const Eo *obj, Elm_Genlist_Data *pd)
_elm_genlist_efl_ui_focus_manager_manager_focus_get(const Eo *obj, EINA_UNUSED Elm_Genlist_Data *pd)
{
Eo *focused_obj = efl_ui_focus_manager_focus_get(efl_super(obj, MY_CLASS));
Eo *registered_manager = efl_ui_focus_object_focus_manager_get(obj);
@ -3456,7 +3456,7 @@ _elm_genlist_efl_ui_focus_manager_manager_focus_get(const Eo *obj, Elm_Genlist_D
}
static Efl_Ui_Focus_Object*
_select_candidate(Eo *obj, Elm_Genlist_Data *pd, Efl_Ui_Focus_Direction direction)
_select_candidate(Eo *obj, EINA_UNUSED Elm_Genlist_Data *pd, Efl_Ui_Focus_Direction direction)
{
Elm_Object_Item *first = elm_genlist_first_item_get(obj);
Elm_Object_Item *last = elm_genlist_last_item_get(obj);

View File

@ -2675,7 +2675,7 @@ _elm_scroll_momentum_calc(int dx, int dy, double dt, double *vx, double *vy, int
fvel_y = vel_y * (1/60.0);
fvel = vel * (1/60.0);
if (abs(fvel) < _elm_config->thumbscroll_threshold ) return EINA_FALSE;
if (abs((int) fvel) < _elm_config->thumbscroll_threshold ) return EINA_FALSE;
// calculate a number of frames to reach min_px when it follows a geometric sequence with scale factor r
n = log(min_px/fvel) / log(r);

View File

@ -259,7 +259,6 @@ EOLIAN static Eina_Bool
_efl_canvas_vg_object_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *pd, const char *file, const char *key)
{
Vg_Cache_Entry *old_entry;
int w, h;
if (!file) return EINA_FALSE;

View File

@ -5564,7 +5564,7 @@ _layout_item_obstacle_get(Ctxt *c, Evas_Object_Textblock_Item *it);
static int
_layout_par(Ctxt *c)
{
Evas_Object_Textblock_Item *it, *prev_it;
Evas_Object_Textblock_Item *it;
Eina_List *i;
int ret = 0;
int wrap = -1;
@ -5681,8 +5681,8 @@ _layout_par(Ctxt *c)
int redo_item = 0;
Evas_Textblock_Obstacle_Info *obs_info = NULL;
Evas_Coord itw;
Evas_Object_Textblock_Item *prev_it = it;
prev_it = it;
it = _ITEM(eina_list_data_get(i));
/* Skip visually deleted items */
if (it->visually_deleted ||