[sigc] 2.0 warning: unused variable `SigC::Object&test_whether_A_obj_derives_from_trackable'



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]