On Tue, Nov 29, 2011 at 5:56 PM, Patrick Ohly <patrick.o...@intel.com> wrote: > On Di, 2011-11-29 at 15:09 +0100, Chris Kühl wrote: >> On Tue, Nov 29, 2011 at 2:31 PM, Patrick Ohly <patrick.o...@intel.com> wrote: >> > On Di, 2011-11-29 at 13:20 +0100, Chris Kühl wrote: > [patch with NULL check] >> > Does that look right? >> > >> >> Seems fine to me. > > I've merged your branch and applied the fix. > >> > Speaking of DBusErrorCXX, why does it have a separate "message" member? >> > >> >> That's only in there to maintain compatibility. I believe the examples >> were the only place the message field was used however. We could >> easliy change those and get read of this member. > > Yes, let's do that. I'm working on a patch.
Ok. > > Looking closer at compiler output, I saw a warning about this code: > > class DBusResult : virtual public Result > { > [...] > virtual void failed(const dbus_error &error) > { > GDBusMessage *errMsg; > errMsg = g_dbus_message_new_method_error(m_msg.get(), > error.dbusName().c_str(), > "%s", error.what()); > ===> if (!g_dbus_connection_send_message(m_conn.get(), m_msg.get(), > G_DBUS_SEND_MESSAGE_FLAGS_NONE, > NULL, NULL)) { > throw std::runtime_error(" g_dbus_connection_send_message failed"); > } > } > > gdbus-cxx-bridge.h: In member function 'virtual void > GDBusCXX::DBusResult::failed(const GDBusCXX::dbus_error&)': > gdbus-cxx-bridge.h:1778:23: warning: variable 'errMsg' set but not used > [-Wunused-but-set-variable] > > Is errMsg the message which is meant to be sent above? > Yes. Thanks for catching that. Cheers, Chris _______________________________________________ SyncEvolution mailing list SyncEvolution@syncevolution.org http://lists.syncevolution.org/listinfo/syncevolution