[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libsigc-list
Subject:    Re: [sigc] 2.0 warning: unused variable
From:       Martin Schulze <martin-ml () hippogriff ! de>
Date:       2004-05-20 19:09:58
Message-ID: 20040520190958.GE654 () ipcnotebook ! schulze
[Download RAW message or body]

I followed your suggestion and committed the change to cvs.

Thanks!

  Martin


Am 2004.05.19 09:40 schrieb(en) Timothy M. Shead:
> Building an existing application on Gentoo x86 with gcc (GCC) 3.3.2  
> and using the compatibility interface in sigc++ 2.0, I get lots of  
> the following:
> 
>   /usr/local/libsigc/include/sigc++-2.0/sigc++/object_slot.h:29:
>   warning: unused variable
>     `SigC::Object&test_whether_A_obj_derives_from_trackable'
> 
> ... harmless, but annoying.  Looking at object_slot.h I see the  
> following:
> 
>   Object& test_whether_A_obj_derives_from_trackable =
>     dynamic_cast< Object&>(_A_obj);
> 
> So, the intent is pretty clear, to throw an exception if the object  
> you're creating the slot for isn't trackable, which makes good sense.  
> Question is, couldn't you replace this with
> 
>   dynamic_cast<Object&>(_A_obj);
> 
> and get the same result, without the warning?
> 
> Cheers,
> Tim
> _______________________________________________
> libsigc-list mailing list
> libsigc-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/libsigc-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic