[Patch] Use Qt XML to decode config.xml files

Michael Sprauer Michael at Sprauer.net
Tue Apr 5 01:55:28 PDT 2011


>>  static DBusConnection *
>> diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
>> index d053559..11a2eb1 100644
>> --- a/dbus/dbus-message.c
>> +++ b/dbus/dbus-message.c
>> @@ -3839,6 +3839,7 @@ 
>> _dbus_message_loader_get_unix_fds(DBusMessageLoader  *loader,
>>    return TRUE;
>>  #else
>>    _dbus_assert_not_reached("Platform doesn't support unix fd 
>> passing");
>> +  return FALSE;
>>  #endif
>
> This will probably *cause* warnings under gcc, because
> _dbus_assert_not_reached can't return (like abort() or exit()). The
> "return FALSE" can't actually be reached, and gcc knows that via the
> _DBUS_GNUC_NORETURN annotation.
>
> According to some Googling, it seems MSVC++ can support this via
> __declspec(noreturn). Does __declspec(noreturn) have to appear like 
> this:
>
>     __declspec(noreturn) void exit (int code);
>
> or can it be used like this?
>
>     void exit (int code) __declspec(noreturn);
>
> If it can be used after the declaration, we can define 
> _DBUS_GNUC_NORETURN
> to __declspec(noreturn) on MSVC++; if it has to be used before, we 
> can
> probably still do that, but we'd have to move it to the beginning of 
> the
> declaration everywhere it's used.

 It has to be written before the declaration.

 Michael


More information about the dbus mailing list