On Thu, 10 Mar 2016 17:43:01 +0000 Tom Hacohen <t...@osg.samsung.com> said:
> On 10/03/16 17:02, Cedric BAIL wrote: > > On Mar 10, 2016 8:10 AM, "Tom Hacohen" <t...@osg.samsung.com> wrote: > >> > >> Huh? It is valid and the code is correct. What seems to be the problem? > >> Works here with no warnings (clang), but anyhow, the code is correct. > > > >>From gcc point of view gl was undefined when set to sd->genlist and that > > did come with a big fat warning :-) > > > > GCC is wrong, but I guess you had to silence it. :| gcc generates warnings because it sees this as a possible code bug - you pass in a reference and fill it then also re-assign the value again as a return from the same func. in any sane world most people reading that code would go "wtf? is that a bug? did they may to pass in &somethingelse instead of &gl because this assigns it twice? are we losing a reference to something here?". gcc is saying that. the code itself wasn't broken. it would work, BUT it LOOKS like a bug to any "sane person". and gcc warns. the more warnings we let through, the more real issues hide in warnings we now ignore in the sea of warnings scrolling by. thus why it is being "shut up". but it is a point - it looks insane. imho eo_add given its current use of & should not return anything and we assign return by reference. at least then it doesn't look like a bug. > -- > Tom. > > >> -- > >> Tom. > >> > >> On 10/03/16 00:59, Cedric BAIL wrote: > >>> cedric pushed a commit to branch master. > >>> > >>> > > http://git.enlightenment.org/core/elementary.git/commit/?id=da8287fa370bb579a4a592dd280ac5c8a6a25830 > >>> > >>> commit da8287fa370bb579a4a592dd280ac5c8a6a25830 > >>> Author: Cedric BAIL <ced...@osg.samsung.com> > >>> Date: Wed Mar 9 16:57:02 2016 -0800 > >>> > >>> combobox: fix borkage after eo_add change. > >>> > >>> toto = titi = eo_add is no longer valid. > >>> --- > >>> src/lib/elc_combobox.c | 6 ++++-- > >>> 1 file changed, 4 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c > >>> index 4227cea..8f2b141 100644 > >>> --- a/src/lib/elc_combobox.c > >>> +++ b/src/lib/elc_combobox.c > >>> @@ -359,7 +359,8 @@ _elm_combobox_eo_base_constructor(Eo *obj, > > Elm_Combobox_Data *sd) > >>> elm_table_pack(sd->tbl, sd->spacer, 0, 0, 1, 1); > >>> > >>> // This is the genlist object that will take over the genlist call > >>> - sd->genlist = gl = eo_add(&gl, ELM_GENLIST_CLASS, obj); > >>> + eo_add(&gl, ELM_GENLIST_CLASS, obj); > >>> + sd->genlist = gl; > >>> elm_genlist_filter_set(gl, NULL); > >>> elm_widget_mirrored_automatic_set(gl, EINA_FALSE); > >>> elm_widget_mirrored_set(gl, elm_widget_mirrored_get(obj)); > >>> @@ -373,7 +374,8 @@ _elm_combobox_eo_base_constructor(Eo *obj, > > Elm_Combobox_Data *sd) > >>> elm_table_pack(sd->tbl, gl, 0, 0, 1, 1); > >>> > >>> // This is the entry object that will take over the entry call > >>> - sd->entry = entry = eo_add(&entry, ELM_ENTRY_CLASS, obj); > >>> + eo_add(&entry, ELM_ENTRY_CLASS, obj); > >>> + sd->entry = entry; > >>> elm_widget_mirrored_automatic_set(entry, EINA_FALSE); > >>> elm_widget_mirrored_set(entry, elm_widget_mirrored_get(obj)); > >>> elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, > >>> > >> > >> > >> > > ------------------------------------------------------------------------------ > >> Transform Data into Opportunity. > >> Accelerate data analysis in your applications with > >> Intel Data Analytics Acceleration Library. > >> Click to learn more. > >> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > >> _______________________________________________ > >> enlightenment-devel mailing list > >> enlightenment-devel@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >> > > ------------------------------------------------------------------------------ > > Transform Data into Opportunity. > > Accelerate data analysis in your applications with > > Intel Data Analytics Acceleration Library. > > Click to learn more. > > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > > _______________________________________________ > > enlightenment-devel mailing list > > enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel