Thread: Re: [Dbus-cxx-users] 'std::string DBus::Method<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc
Status: Beta
Brought to you by:
rvinyard
From: Christoph P. <pra...@gm...> - 2013-09-10 15:46:24
|
Okay thank you for your answer. Do you also plan to release a new version soon? Best regards Von: Robert Middleton [mailto:rmi...@sy...] Gesendet: Dienstag, 10. September 2013 17:00 An: Christoph Pramberger Cc: dbu...@li... Betreff: Re: [Dbus-cxx-users] 'std::string DBus::Method<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::introspect(int) const [with T_return = double, T_arg1 = double, T_arg2 = double]' - warning: 'type' may be used uninitialized Christoph, So basically what's going on here is that GCC is probably being a little too helpful in this case. It's complaining that it's going to call a method with an uninitialized variable, but the only reason we need the variable is to figure out which overloaded method is called, which means that the variable is never actually used. It does it this way to exploit the recursive call in order to build up the proper D-Bus signature - although now that I think about it, it may be possible to use TMP to achieve the same effect...(I will look into it sometime this week/weekend. I'm currently updating the dbus-cxx tools) You could try: http://stackoverflow.com/questions/965093/selectively-disable-gcc-warnings-f or-only-part-of-a-translation-unit -Robert Middleton On Tue, Sep 10, 2013 at 3:45 AM, Christoph Pramberger <pra...@gm...> wrote: Hello, currently I'm using the SVN repository of dbus-cxx. If I compile the example programm "server.cpp" I get following warnings: /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h: In member function 'std::string DBus::Method<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, sigc::nil>::introspect(int) const [with T_return = double, T_arg1 = double, T_arg2 = double]': /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:290: warning: 'type' may be used uninitialized in this function /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:294: warning: 'arg1' may be used uninitialized in this function /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:298: warning: 'arg2' may be used uninitialized in this function Does anybody know how I can fix that, because I mostly compile my code with "-Wall -Werror". Thanks ---------------------------------------------------------------------------- -- How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111 <http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk > &iu=/4140/ostg.clktrk _______________________________________________ Dbus-cxx-users mailing list Dbu...@li... https://lists.sourceforge.net/lists/listinfo/dbus-cxx-users |
From: Robert M. <rmi...@sy...> - 2013-09-10 18:28:23
|
Once I finish my re-work of the tools, I'll have a new version out; it should be in the next week or two. I'll work on the warnings for the next release. -Robert Middleton On Tue, Sep 10, 2013 at 11:46 AM, Christoph Pramberger < pra...@gm...> wrote: > Okay thank you for your answer. > > > > Do you also plan to release a new version soon? > > > > Best regards > > > > *Von:* Robert Middleton [mailto:rmi...@sy...] > *Gesendet:* Dienstag, 10. September 2013 17:00 > *An:* Christoph Pramberger > *Cc:* dbu...@li... > *Betreff:* Re: [Dbus-cxx-users] ‘std::string DBus::Method<T_return, > T_arg1, T_arg2, sigc::nil, sigc::nil, sigc::nil, sigc::nil, > sigc::nil>::introspect(int) const [with T_return = double, T_arg1 = double, > T_arg2 = double]’ - warning: ‘type’ may be used uninitialized > > > > Christoph, > > > > So basically what's going on here is that GCC is probably being a little > too helpful in this case. It's complaining that it's going to call a > method with an uninitialized variable, but the only reason we need the > variable is to figure out which overloaded method is called, which means > that the variable is never actually used. It does it this way to exploit > the recursive call in order to build up the proper D-Bus signature - > although now that I think about it, it may be possible to use TMP to > achieve the same effect...(I will look into it sometime this week/weekend. > I'm currently updating the dbus-cxx tools) > > > > You could try: > > > http://stackoverflow.com/questions/965093/selectively-disable-gcc-warnings-for-only-part-of-a-translation-unit > > > > -Robert Middleton > > > > On Tue, Sep 10, 2013 at 3:45 AM, Christoph Pramberger < > pra...@gm...> wrote: > > Hello, > > currently I'm using the SVN repository of dbus-cxx. > > If I compile the example programm "server.cpp" I get following warnings: > > /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h: In member function > ‘std::string DBus::Method<T_return, T_arg1, T_arg2, sigc::nil, sigc::nil, > sigc::nil, sigc::nil, sigc::nil>::introspect(int) const [with T_return = > double, T_arg1 = double, T_arg2 = double]’: > /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:290: warning: ‘type’ may > be used uninitialized in this function > /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:294: warning: ‘arg1’ may > be used uninitialized in this function > /usr/local/include/dbus-cxx-0.7/dbus-cxx/method.h:298: warning: ‘arg2’ may > be used uninitialized in this function > > Does anybody know how I can fix that, because I mostly compile my code > with "-Wall -Werror". > > Thanks > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. Consolidate legacy IT systems to a single system of record for IT > 2. Standardize and globalize service processes across IT > 3. Implement zero-touch automation to replace manual, redundant tasks > http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk > _______________________________________________ > Dbus-cxx-users mailing list > Dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbus-cxx-users > > > |