On Tue, 2009-09-01 at 07:35 -0300, Gustavo Sverzut Barbieri wrote:
> On Mon, Aug 31, 2009 at 9:39 PM, Enlightenment
> SVN<no-re...@enlightenment.org> wrote:
> > Log:
> >  silence clang warnings
> ...
> > Modified: trunk/E-MODULES-EXTRA/drawer/src/plugins/views/list.c
> > ===================================================================
> > --- trunk/E-MODULES-EXTRA/drawer/src/plugins/views/list.c       2009-08-31 
> > 21:04:13 UTC (rev 42140)
> > +++ trunk/E-MODULES-EXTRA/drawer/src/plugins/views/list.c       2009-09-01 
> > 00:39:26 UTC (rev 42141)
> > @@ -290,6 +290,9 @@
> >                }
> >              e = _list_horizontal_entry_create(inst, si);
> >              break;
> > +           default:
> > +              e = NULL;
> > +              break;
> >          }
> >        inst->entries = eina_list_append(inst->entries, e);
> >        e_box_pack_end(inst->o_box, e->o_holder);
> 
> silence is not good, this last hunk will likely introduce a bug since
> you're appending e == NULL to inst->entries and likely a new run of
> the CLang static checker will point out you just introduced a NULL
> pointer dereference in the line following it: e->o_holder == CRASH!
> 
> Please take care to not silence problems and introduce a new, tricker
> bug! (it would be the case with inst->entries containing data == NULL,
> we'd have to check for data != NULL in every place and possible fail
> once and screw, it's much more safe avoiding NULL pointers to get into
> the list.

the default path is technically impossible, but I added it just to
silence the warning. But I'll take care not to add null entries as well.
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to